We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Passed by reference errors for extensions in PHP 5.3+

Developer Preview

Low's avatar
Low
407 posts
13 years ago
Low's avatar Low

Looks like v2.5.3 of /libraries/Extensions.php changed its php4 check, which is good. But it also removed other code which now seems to break existing extensions – anything having a referenced var in the method arguments, for example sessions_end(&$session).

I haven’t caught this before, since my dev environment was on PHP 5.2, which does not throw the error. Reverting back to the EE2.5.2 version of Extensions.php solves it for all add-ons.

The related bug report mentions obsolete code, but more was removed than necessary, namely:

if (is_php('5'))
{
 foreach($args as $k => $v)
 {
  $php5_args[$k] =& $args[$k];
 }
}

and below that

elseif ( ! empty($php5_args))
{
 $this->last_call = call_user_func_array(array(&$this->OBJ[$class_name], $method), $php5_args);
}

Thoughts?

       
Low's avatar
Low
407 posts
13 years ago
Low's avatar Low

Hey devs, any response to this? Is this a bug or should we change our add-ons?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.