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

php 5.3 throws E_STRICT on Assign by Reference resulting in unaccessible captcha-settings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 3.0.7-PL1
    • None
    • None
    • PHP 5.3.x

      We had several support requestes about that on phpbb.de
      (Just one example: https://www.phpbb.de/community/viewtopic.php?f=73&t=204889)

      As per title and as per post, php >5.3 throws an E_STRICT error on the captcha code:

      Deprecated: Assigning the return value of new by reference is deprecated in /***/www/includes/captcha/plugins/phpbb_recaptcha_plugin.php on line 54

      	function &get_instance()
      	{
      		$instance =& new phpbb_recaptcha();
      		return $instance;
      	}

      rxu finally found the part of the manual refering to that:
      http://www.php.net/manual/en/language.references.whatdo.php#language.references.whatdo.assign

      Since PHP 5, new returns a reference automatically, so using =& in this context is deprecated and produces an E_STRICT message.

      Therefor the Deprecated error is not suppressed by phpBB

            bantu Andreas Fischer [X] (Inactive)
            nickvergessen Joas Schilling
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: