Last modified: 2010-05-15 15:59:49 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 T13751, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11751 - autoConvert() should use StubObject::isRealObject() instead of isset() in LanguageConverter.php
autoConvert() should use StubObject::isRealObject() instead of isset() in Lan...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Language converter (Other open bugs)
1.11.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 11785
  Show dependency treegraph
 
Reported: 2007-10-24 02:31 UTC by Alexey
Modified: 2010-05-15 15:59 UTC (History)
4 users (show)

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


Attachments
LanguageConverter.php.patch (428 bytes, patch)
2007-12-04 06:17 UTC, Shinjiman
Details

Description Alexey 2007-10-24 02:31:51 UTC
When the page is loaded from the cache, and autoConvert is called to convert the title, $wgParser is a StubObject so the check isset($wgParser) is always true. This produces wrong regexp that prevents latin characters conversion. Using StubObject::isRealObject() fixes this issue.
Comment 1 Shinjiman 2007-12-04 06:17:00 UTC
Created attachment 4403 [details]
LanguageConverter.php.patch

Try to having this patch to resolving this issue.
Comment 2 AlefZet 2008-05-25 19:27:12 UTC
Shouldn't fix this bug in SVN?
Comment 3 Max Semenik 2008-05-25 19:41:26 UTC
This patch is incorrect, it should use

if (StubObject::isRealObject($wgParser))

 instead of 

if (StubObject::isRealObject())
Comment 4 Robert Stojnic 2008-05-25 19:54:02 UTC
Extensions calling setHook() on wgParser will unstub it (e.g. by commonly used Cite extension), so that wouldn't work. I've commited a suboptimal patch that resolves the issue in r34537, so marking this as fixed. 

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


Navigation
Links