Page MenuHomePhabricator

Fatal error: Call to a member function getTitle() on a non-object in CirrusSearch/includes/Hooks.php on line 414
Closed, ResolvedPublic

Description

[2014-07-15 20:16:22] Fatal error: Call to a member function getTitle() on a non-object at /usr/local/apache/common-local/php-1.24wmf12/extensions/CirrusSearch/includes/Hooks.php on line 414
Server: mw1079
Method: GET
URL: http://en.wikipedia.org/wiki/Special:Random?426635684
Cookie:
Backtrace:
#0 /usr/local/apache/common-local/php-1.24wmf12/extensions/CirrusSearch/includes/Hooks.php(414): CirrusSearch\Hooks::onSpecialRandomGetRandomTitle()
#1 [internal function]: CirrusSearch\Hooks::onSpecialRandomGetRandomTitle('0.135488314728', false, Array, Array, NULL)
#2 /usr/local/apache/common-local/php-1.24wmf12/includes/Hooks.php(206): call_user_func_array('CirrusSearch\Ho...', Array)
#3 /usr/local/apache/common-local/php-1.24wmf12/includes/GlobalFunctions.php(4040): Hooks::run('SpecialRandomGe...', Array, NULL)
#4 /usr/local/apache/common-local/php-1.24wmf12/includes/specials/SpecialRandompage.php(110): wfRunHooks('SpecialRandomGe...', Array)
#5 /usr/local/apache/common-local/php-1.24wmf12/includes/specials/SpecialRandompage.php(63): RandomPage->getRandomTitle()
#6 /usr/local/apache/common-local/php-1.24wmf12/includes/specialpage/SpecialPage.php(382): RandomPage->execute(NULL)
#7 /usr/local/apache/common-local/php-1.24wmf12/includes/specialpage/SpecialPageFactory.php(515): SpecialPage->run(NULL)
#8 /usr/local/apache/common-local/php-1.24wmf12/includes/Wiki.php(288): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#9 /usr/local/apache/common-local/php-1.24wmf12/includes/Wiki.php(603): MediaWiki->performRequest()
#10 /usr/local/apache/common-local/php-1.24wmf12/includes/Wiki.php(452): MediaWiki->main()
#11 /usr/local/apache/common-local/php-1.24wmf12/index.php(46): MediaWiki->run()
#12 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#13 {main}


Version: unspecified
Severity: normal

Details

Reference
bz68065

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:34 AM
bzimport added a project: CirrusSearch.
bzimport set Reference to bz68065.
bzimport added a subscriber: Unknown Object (MLST).

Looks like line 423 in master

				if ( isset( $results[ 0 ] ) ) {
					$title = WikiPage::newFromID( $results[ 0 ] )->getTitle();
					return false;
				}

WikiPage::newFromID() can return null

Change 146588 had a related patch set uploaded by Reedy:
Call to a member function getTitle() on a non-object in CirrusSearch Hooks

https://gerrit.wikimedia.org/r/146588

Change 146588 merged by jenkins-bot:
Call to a member function getTitle() on a non-object in CirrusSearch Hooks

https://gerrit.wikimedia.org/r/146588