Edit report at http://bugs.php.net/bug.php?id=50394&edit=1
ID: 50394 User updated by: tstarling at wikimedia dot org Reported by: tstarling at wikimedia dot org Summary: Reference argument converted to value in __call Status: Closed Type: Bug Package: Scripting Engine problem Operating System: Linux PHP Version: 5.3.1 Assigned To: pajoye Block user comment: N New Comment: Commenters please note: you're receiving an error "parameter expected to be a reference, value given", that does not mean that you are seeing this bug. In fact, if you're using PHP 5.3.2 or later, it is pretty much impossible for it to be this bug. Most cases of "parameter expected to be a reference, value given" are due to bugs in the user code, not due to any problem with PHP. The message indicates a mismatch between the reference/value status of arguments to call_user_func_array() and the function declaration, as in: function foo( &$x ) {} $x = ''; call_user_func_array( 'foo', array( $x ) ); The correct way to call the function foo() in this case is: call_user_func_array( 'foo', array( &$x ) ); That is to say, the reference must be explicit in the array on the calling side. Previous Comments: ------------------------------------------------------------------------ [2010-09-15 01:16:45] jeremy at tuxmachine dot com See bug 51174. ------------------------------------------------------------------------ [2010-09-04 01:16:50] david at tuxteam dot com This seems to be an issue for Drupal modules as well. This is a significant problem for running Drupal on PHP 5.3. ------------------------------------------------------------------------ [2010-08-10 09:14:45] parktrip at gmail dot com I have the same problem with mediawiki 1.15.5 and PHP 5.3.2 (lastest version from Zend Server) So is this a MW problem or PHP ? ------------------------------------------------------------------------ [2010-07-23 01:09:33] heis dot turtlemad at gmail dot com > Mediawiki is wrong in their comments. Not quite true. > There is a regression which was fixed in 5.3.2, > so upgrade to 5.3.2 is the right way to do it. Upgrading to 5.3.2 doesn't solve the issue, running the following softwares: FreeBSD 8/Nginx/MediaWiki 1.15.4 Any call to a Mediawiki extension fails on the following error: <Parameter n to xxx expected to be a reference, value given in yyy> Downgrading to 5.2 is actually the only way to get rid of this. ------------------------------------------------------------------------ [2010-06-06 19:04:27] paj...@php.net Mediawiki is wrong in their comments. There is a regression which was fixed in 5.3.2, so upgrade to 5.3.2 is the right way to do it. No need of further comments tho', the issue is fixed. Thanks for your feedbacks. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=50394 -- Edit this bug report at http://bugs.php.net/bug.php?id=50394&edit=1