Page MenuHomePhabricator

CentralAuth Fatal error: Call to a member function getText() on a non-object
Closed, ResolvedPublic

Description

[15-Nov-2012 09:46:03] Fatal error: Call to a member function getText() on a non-object at /usr/local/apache/common-local/php-1.21wmf3/extensions/CentralAuth/CentralAuthHooks.php on line 248
Server: srv241
Method: GET
URL: http://zh.wikipedia.org/wiki/麻çå¸
Backtrace:
#0 /usr/local/apache/common-local/php-1.21wmf3/extensions/CentralAuth/CentralAuthHooks.php(248): CentralAuthHooks::onUserLoadFromSession()
#1 [internal function]: CentralAuthHooks::onUserLoadFromSession(Object(User), NULL)
#2 /usr/local/apache/common-local/php-1.21wmf3/includes/Hooks.php(253): call_user_func_array('CentralAuthHook...', Array)
#3 /usr/local/apache/common-local/php-1.21wmf3/includes/GlobalFunctions.php(3811): Hooks::run('UserLoadFromSes...', Array)
#4 /usr/local/apache/common-local/php-1.21wmf3/includes/User.php(925): wfRunHooks('UserLoadFromSes...', Array)
#5 /usr/local/apache/common-local/php-1.21wmf3/includes/User.php(289): User->loadFromSession()
#6 /usr/local/apache/common-local/php-1.21wmf3/includes/User.php(4154): User->load()
#7 /usr/local/apache/common-local/php-1.21wmf3/includes/User.php(2216): User->loadOptions()
#8 /usr/local/apache/common-local/php-1.21wmf3/includes/context/RequestContext.php(276): User->getOption('language')
#9 /usr/local/apache/common-local/php-1.21wmf3/includes/Message.php(327): RequestContext->getLanguage()
#10 /usr/local/apache/common-local/php-1.21wmf3/includes/context/RequestContext.php(355): Message->setContext(Object(RequestContext))
#11 [internal function]: RequestContext->msg('pagetitle')
#12 /usr/local/apache/common-local/php-1.21wmf3/includes/context/ContextSource.php(166): call_user_func_array(Array, Array)
#13 /usr/local/apache/common-local/php-1.21wmf3/includes/OutputPage.php(833): ContextSource->msg('pagetitle')
#14 /usr/local/apache/common-local/php-1.21wmf3/includes/Article.php(557): OutputPage->setPageTitle('?????????')
#15 /usr/local/apache/common-local/php-1.21wmf3/includes/actions/ViewAction.php(37): Article->view()
#16 /usr/local/apache/common-local/php-1.21wmf3/includes/Wiki.php(429): ViewAction->show()
#17 /usr/local/apache/common-local/php-1.21wmf3/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))
#18 /usr/local/apache/common-local/php-1.21wmf3/includes/Wiki.php(555): MediaWiki->performRequest()
#19 /usr/local/apache/common-local/php-1.21wmf3/includes/Wiki.php(448): MediaWiki->main()
#20 /usr/local/apache/common-local/php-1.21wmf3/index.php(59): MediaWiki->run()
#21 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#22 {main}


Version: unspecified
Severity: normal

Details

Reference
bz42169

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:09 AM
bzimport set Reference to bz42169.
bzimport added a subscriber: Unknown Object (MLST).
		// Clean up username
		$title = Title::makeTitleSafe( NS_USER, $userName );
		if ( !$title ) {
			wfDebug( __METHOD__ . ": invalid username\n" );
		}
		$userName = $title->getText();

^ I guess it should do something about the error (fail/whatever), rather than just trying to carry on when it's a bad object as it's not going to get much further if it fatals