Last modified: 2007-06-01 15:53:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T12083, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10083 - Error on Special:Version in multiscript wiki
Error on Special:Version in multiscript wiki
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.11.x
PC Windows XP
: Normal critical (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-31 09:21 UTC by AlefZet
Modified: 2007-06-01 15:53 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description AlefZet 2007-05-31 09:21:53 UTC
Environment:
Windows XP SP2
XAMPP 1.6.2
$wgLanguageCode = "kk"; ## or sr, zh with multiscript enabled
wgUserLanguage = "kk"; #

Trying go to link Special:Version causes error:
'Catchable fatal error: Object of class KkConverter could not be converted to string in C:\xampplite\htdocs\w\includes\SpecialVersion.php on line 241' 
where KkConverter may be SrConverter or ZhConverter if you specify sr or zh

When user language changed for example to en, we have same error.

On Betawiki (http://nike.users.idler.fi/betawiki) if user language in Preferences set to kk, Special:Version generates error:
'Catchable fatal error: Object of class KkConverter could not be converted to string in /home/nike/public_html/dev/includes/SpecialVersion.php on line 243'

When user language changed for example to en, we have page as expected.

Both happense around function listToText()
Comment 1 Brion Vibber 2007-06-01 15:53:26 UTC
Ok, figured this one out at last...

The language converter modes are adding an ArticleSaveComplete hook using a weird format that I don't particuarly like; it's adding _just_ the object to the hooks array, and I guess it's calling a function based on the hook name.

The Special:Version code which lists the installed hooks doesn't properly handle this case in SpecialVersion::arrayToString(), so the object is passed up another level and interpolated directly into a string.

In PHP 5.1 this simply turns into something like "Object id #17".

In PHP 5.2, this seems to trigger a catchable, but uncaught, fatal error.
Since we've still got 5.1 on the live servers, nobody noticed it there before. :)

Fixed in r22630

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links