Last modified: 2011-01-15 17:45:49 UTC
Created attachment 7989 [details] FIxes third parameter mis-match with parser call I updated my PHP version from 5.2.4 to 5.3.4. As a result wikihiero no longer renders properly. I turned on PHP display_errors and the following warning appeared: Warning: Parameter 3 to WikiHieroLoader() expected to be a reference, value given in /czdata/cz/phase3/includes/parser/Parser.php on line 3287 Call Stack: 0.0003 664008 This was followed by a stack trace. I modified the signature of WikiHieroLoader() in wikihiero.php (see attached patch), which eliminated the warning and restored hieroglyphs rendering. I have attached a patch.
adds keyword, changed priority/severity
(In reply to comment #1) > adds keyword, changed priority/severity I should have added one thing. This patch worked for MW 1.16. When I tried to change the signature on a MW 1.13.2 system, it didn't. Rendering completely hung. So, this fix should only apply to MW 1.16 systems.
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/wikihiero/wikihiero.php?view=annotate From what I can see, it's already & in trunk, and has been since before 18926 (which was just whitespace changes) So I've no idea what happened to the copy you are using...
(In reply to comment #3) > http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/wikihiero/wikihiero.php?view=annotate > > From what I can see, it's already & in trunk, and has been since before 18926 > (which was just whitespace changes) > > So I've no idea what happened to the copy you are using... This occurred on a fresh check out of REL1_16_1 (http://svn.wikimedia.org/viewvc/mediawiki/tags/REL1_16_1/). If you look at that tagged branch (http://svn.wikimedia.org/viewvc/mediawiki/tags/REL1_16_1/extensions/wikihiero/wikihiero.php?revision=79565&view=markup), the revision of Wikihiero is 79565. So, the most stable version of MW does not contain the bug fix.
http://svn.wikimedia.org/viewvc/mediawiki/tags/REL1_16_1/extensions/wikihiero/wikihiero.php?annotate=79565 52 hashar 18926 // MediaWiki entry point 53 function WikiHieroLoader( $text, $attribs, &$parser ) { And it's there in r66255.tar.gz">http://upload.wikimedia.org/ext-dist/wikihiero-MW1.16-r66255.tar.gz I'm beyond confused
Please note the patch is mixed up. User actually request to remove the ampersand used to pass the parser by reference.
Right r80319 Needs backporting to 1.17 and 1.16
(In reply to comment #6) > Please note the patch is mixed up. User actually request to remove the > ampersand used to pass the parser by reference. (In reply to comment #6) > Please note the patch is mixed up. User actually request to remove the > ampersand used to pass the parser by reference. Mea Culpa. Yes, the patch was backwards. My apologies.