Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-15982

Q&A captcha plug-in still throws PHP 7.2.x countable warning

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2.8-RC1
    • 3.2.5
    • Other
    • None
    • phpBB 3.2.5, PHP 7.2.x

      Visited phpBB 3.2.5 site from support forum user, and noticed the following warning was being generated on the registration page:

      [phpBB Debug] PHP Warning: in file [ROOT]/phpbb/captcha/plugins/qa.php on line 87: count(): Parameter must be an array or an object that implements Countable
      [phpBB Debug] PHP Warning: in file [ROOT]/phpbb/captcha/plugins/qa.php on line 104: count(): Parameter must be an array or an object that implements Countable

      Code inspection of the /phpbb/captcha/plugins/qa.php module in phpBB 3.2.5 confirms that "var $question_ids" doesn't have an array() declaration for PHP 7.2+.  Reviewing other uses of "count()" in the qa.php module didn't reveal any other omissions (at least not obvious enough for me to identify).

            Marc Marc
            EA117 EA117
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: