Stanislav Malyshev wrote: > > Tim, could you check if the attached patch solves your problem? >
Yes, it works for me, in both the isolated test case and the original MW bug. MW's parser test suite shows 4 failing tests in 5.3.1, all fixed with this patch and no new regressions. Stefan Esser wrote: > just for the record: why does MediaWiki rely on a feature > "Call-Time-Pass-By-Reference" that is deprecated since PHP 4.0.0 <- > Yes exactly 4.0.0 The underlying functions are declared with reference parameters, and we call them with call_user_func_array() so explicitly creating references on the caller side is required. If you have a better method for calling arbitrary functions that accept reference parameters, let me know. Lots of MediaWiki functions are declared with reference parameters for objects when they aren't really needed, because that was the required convention in PHP 4, and we never made a concerted effort to remove all the ampersands. It's too late to fix it now, in many cases, because many extensions declare hook functions with reference parameters, following the caller and documentation that dates from PHP 4, and so we have to keep passing them reference parameters to avoid breaking them in PHP 5.3+. So the window for easy migration to value parameters has closed. -- Tim Starling -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php