Page MenuHomePhabricator

Wikihiero not rendering with PHP 5.3.4
Closed, ResolvedPublic

Description

Author: dnessett

Description:
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.


Version: unspecified
Severity: trivial

Attached:

Details

Reference
bz26713

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 11:21 PM
bzimport added a project: WikiHiero.
bzimport set Reference to bz26713.
bzimport added a subscriber: Unknown Object (MLST).

adds keyword, changed priority/severity

dnessett wrote:

(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...

dnessett wrote:

(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.

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

dnessett wrote:

(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.