Last modified: 2014-10-18 18:35:13 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 T74131, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72131 - PHP notice on every api page
PHP notice on every api page
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
LiquidThreads (Other open bugs)
master
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: noncoreapi 39480
  Show dependency treegraph
 
Reported: 2014-10-16 13:23 UTC by Niklas Laxström
Modified: 2014-10-18 18:35 UTC (History)
5 users (show)

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


Attachments

Description Niklas Laxström 2014-10-16 13:23:08 UTC
Notice: Undefined index: preferences in /www/dev.translatewiki.net/w/includes/GlobalFunctions.php on line 260

Started to happen with the new api.php.

#0 /www/dev.translatewiki.net/w/extensions/LiquidThreads/classes/Hooks.php(530): wfArrayInsertAfter(array, array, string)
#1 [internal function]: LqtHooks::onPersonalUrls(array, Title, SkinApi)
#2 /www/dev.translatewiki.net/w/includes/Hooks.php(206): call_user_func_array(string, array)
#3 /www/dev.translatewiki.net/w/includes/GlobalFunctions.php(4008): Hooks::run(string, array, NULL)
#4 /www/dev.translatewiki.net/w/includes/skins/SkinTemplate.php(710): wfRunHooks(string, array)
#5 /www/dev.translatewiki.net/w/includes/skins/SkinTemplate.php(474): SkinTemplate->buildPersonalUrls()
#6 /www/dev.translatewiki.net/w/includes/skins/SkinTemplate.php(239): SkinTemplate->prepareQuickTemplate(OutputPage)
#7 /www/dev.translatewiki.net/w/includes/OutputPage.php(2184): SkinTemplate->outputPage()
#8 /www/dev.translatewiki.net/w/includes/api/ApiFormatBase.php(180): OutputPage->output()
#9 /www/dev.translatewiki.net/w/includes/api/ApiMain.php(1106): ApiFormatBase->closePrinter()
#10 /www/dev.translatewiki.net/w/includes/api/ApiMain.php(445): ApiMain->printResult(boolean)
#11 /www/dev.translatewiki.net/w/includes/api/ApiMain.php(389): ApiMain->handleException(UsageException)
#12 /www/dev.translatewiki.net/w/includes/api/ApiMain.php(358): ApiMain->executeActionWithErrorHandling()
#13 /www/dev.translatewiki.net/w/api.php(85): ApiMain->execute()
#14 {main}
Comment 1 Brad Jorsch 2014-10-16 15:40:38 UTC
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.
Comment 2 Gerrit Notification Bot 2014-10-17 18:47:45 UTC
Change 167247 had a related patch set uploaded by Anomie:
API: Clean up skin handling

https://gerrit.wikimedia.org/r/167247
Comment 3 Gerrit Notification Bot 2014-10-18 18:32:51 UTC
Change 167247 merged by jenkins-bot:
API: Clean up skin handling

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

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


Navigation
Links