Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-15982

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.2.5
    • 3.2.8-RC1
    • Other
    • None
    • phpBB 3.2.5, PHP 7.2.x

    Description

      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).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: