https://bugzilla.wikimedia.org/show_bug.cgi?id=17407


Peter B. <pe...@lvp-media.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pe...@lvp-media.com




--- Comment #6 from Peter B. <pe...@lvp-media.com>  2009-02-11 20:47:23 UTC ---
The problem indeed lies in the implementation of the StubObject, it doesn't
forward the call properly (there are some warnings about references too); the
parse () method-call never reaches the Parser class. This is because of a
change in the 5.3 codebase: in previous versions PHP would be silent if you'd
pass values in call_user_func_array, even if they were declared references
(which in theory wouldn't work - there's nothing to reference to). In PHP 5.3
however this throws a warning, and the function call will be aborted. A simple
snippet to reproduce this;

<?php
function test (& $value)
{
        echo 'Hello, world!';
}

call_user_func_array ('test', array (5));
?>

In PHP 5.2 this echos "Hello, world!", in PHP 5.3 nothing other than a warning.
I'm not familiar with the MediaWiki codebase so I wasn't capable of producing a
proper fix, however, disabling the StubObject did solve the problem. A simple
patch is included below, doing nothing else than disabling the StubObject for
the Parser class.

Regards,
Peter

---------------------------------------------------

includes/Setup.php : 244

- $wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array(
$wgParserConf ) );
+ $wgParser = new $wgParserConf['class'] ($wgParserConf);


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to