Page MenuHomePhabricator

PHP Fatal error: Call to a member function isLocal() on a non-object in Title.php
Closed, ResolvedPublic

Description

PHP Fatal error: Call to a member function isLocal() on a non-object in /usr/local/apache/common-local/php-1.21wmf5/includes/Title.php on line 579

Stack trace to come


Version: 1.21.x
Severity: normal

Details

Reference
bz42649

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:13 AM
bzimport set Reference to bz42649.
Reedy created this task.Dec 3 2012, 4:25 PM
Reedy added a comment.Dec 3 2012, 4:27 PM

[03-Dec-2012 09:14:55] Fatal error: Call to a member function isLocal() on a non-object at /usr/local/apache/common-local/php-1.21wmf5/includes/Title.php on line 579
Server: srv268
Method: GET
URL: http://it.wikivoyage.org/wiki/Utente:(WV-it)_Luke_Westwalker
Backtrace:
#0 /usr/local/apache/common-local/php-1.21wmf5/includes/Title.php(579): Title::isLocal()
#1 /usr/local/apache/common-local/php-1.21wmf5/includes/WikiPage.php(925): Title->isLocal()
#2 /usr/local/apache/common-local/php-1.21wmf5/includes/WikiPage.php(909): WikiPage->getRedirectURL(Object(Title))
#3 [internal function]: WikiPage->followRedirect()
#4 /usr/local/apache/common-local/php-1.21wmf5/includes/Article.php(1944): call_user_func_array(Array, Array)
#5 /usr/local/apache/common-local/php-1.21wmf5/includes/Wiki.php(366): Article->__call('followRedirect', Array)
#6 /usr/local/apache/common-local/php-1.21wmf5/includes/Wiki.php(366): Article->followRedirect()
#7 /usr/local/apache/common-local/php-1.21wmf5/includes/Wiki.php(295): MediaWiki->initializeArticle()
#8 /usr/local/apache/common-local/php-1.21wmf5/includes/Wiki.php(555): MediaWiki->performRequest()
#9 /usr/local/apache/common-local/php-1.21wmf5/includes/Wiki.php(448): MediaWiki->main()
#10 /usr/local/apache/common-local/php-1.21wmf5/index.php(59): MediaWiki->run()
#11 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#12 {main}

Bumping down the priority a bit on this one. What seems to be happening is that there's some interwiki check that is reporting "gen" a valid interwiki prefix. This then gets passed into Title->isLocal(), which doesn't seem to think it is, so it's not returning a valid interwiki object, and then it's failing.

One fix for the symptom we're seeing here is to make it so that Title->isLocal actually checks whether it gets a valid Interwiki object before calling isLocal on it, and that might be a good little bit of hygiene. However, this seems like old enough code that maybe knowing why the string gets passed in in the first place as a valid interwiki prefix. One idea: it may be that there are two interwiki maps that don't agree with each other; one that has "gen" in it, and another that doesn't.

Note: As this has the 1.21.0 target milestone set, this would require a patch in Gerrit / merge. If this does not receive a patch in the next weeks, the Target Milestone will likely get removed.

Chris: Do you plan to work on this?

Related URL: https://gerrit.wikimedia.org/r/58234 (Gerrit Change Ie6027c818785b12f6be9c47caab77ffa4a587a79)

https://gerrit.wikimedia.org/r/58234 (Gerrit Change Ie6027c818785b12f6be9c47caab77ffa4a587a79) | change APPROVED and MERGED [by jenkins-bot]

Related URL: https://gerrit.wikimedia.org/r/59102 (Gerrit Change Ie6027c818785b12f6be9c47caab77ffa4a587a79)