Page MenuHomePhabricator

PHP notice on every api page
Closed, ResolvedPublic


Notice: Undefined index: preferences in /www/ on line 260

Started to happen with the new api.php.

#0 /www/ wfArrayInsertAfter(array, array, string)
#1 [internal function]: LqtHooks::onPersonalUrls(array, Title, SkinApi)
#2 /www/ call_user_func_array(string, array)
#3 /www/ Hooks::run(string, array, NULL)
#4 /www/ wfRunHooks(string, array)
#5 /www/ SkinTemplate->buildPersonalUrls()
#6 /www/ SkinTemplate->prepareQuickTemplate(OutputPage)
#7 /www/ SkinTemplate->outputPage()
#8 /www/ OutputPage->output()
#9 /www/ ApiFormatBase->closePrinter()
#10 /www/ ApiMain->printResult(boolean)
#11 /www/ ApiMain->handleException(UsageException)
#12 /www/ ApiMain->executeActionWithErrorHandling()
#13 /www/ ApiMain->execute()
#14 {main}

Version: master
Severity: normal



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:59 AM
bzimport set Reference to bz72131.
bzimport added a subscriber: Unknown Object (MLST).

What's going on there is that the API codepath is calling the skin using a context with an anonymous user rather than $wgUser (so that language hacks don't break caching), while LQT is checking $wgUser and assuming that fields are present based on that.

gerritadmin wrote:

Change 167247 had a related patch set uploaded by Anomie:
API: Clean up skin handling

gerritadmin wrote:

Change 167247 merged by jenkins-bot:
API: Clean up skin handling