Page MenuHomePhabricator

PHP Warning: Undefined array key "clientPref"
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Warning: Undefined array key "clientPref"
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.4/extensions/CentralAuth/includes/Hooks/Handlers/SpecialPageBeforeExecuteHookHandler.php(249)
#0/srv/mediawiki/php-1.45.0-wmf.4/extensions/CentralAuth/includes/Hooks/Handlers/SpecialPageBeforeExecuteHookHandler.php(249)MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.45.0-wmf.4/extensions/CentralAuth/includes/Hooks/Handlers/SpecialPageBeforeExecuteHookHandler.php(109)MediaWiki\Extension\CentralAuth\Hooks\Handlers\SpecialPageBeforeExecuteHookHandler->setClientPreferences(MediaWiki\Request\WebRequest)
#2/srv/mediawiki/php-1.45.0-wmf.4/includes/HookContainer/HookContainer.php(155)MediaWiki\Extension\CentralAuth\Hooks\Handlers\SpecialPageBeforeExecuteHookHandler->onSpecialPageBeforeExecute(MediaWiki\Specials\SpecialCreateAccount, null)
#3/srv/mediawiki/php-1.45.0-wmf.4/includes/HookContainer/HookRunner.php(3799)MediaWiki\HookContainer\HookContainer->run(string, array)
#4/srv/mediawiki/php-1.45.0-wmf.4/includes/specialpage/SpecialPage.php(727)MediaWiki\HookContainer\HookRunner->onSpecialPageBeforeExecute(MediaWiki\Specials\SpecialCreateAccount, null)
#5/srv/mediawiki/php-1.45.0-wmf.4/includes/specialpage/SpecialPageFactory.php(1738)MediaWiki\SpecialPage\SpecialPage->run(null)
#6/srv/mediawiki/php-1.45.0-wmf.4/includes/actions/ActionEntryPoint.php(499)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#7/srv/mediawiki/php-1.45.0-wmf.4/includes/actions/ActionEntryPoint.php(143)MediaWiki\Actions\ActionEntryPoint->performRequest()
#8/srv/mediawiki/php-1.45.0-wmf.4/includes/MediaWikiEntryPoint.php(198)MediaWiki\Actions\ActionEntryPoint->execute()
#9/srv/mediawiki/php-1.45.0-wmf.4/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#10/srv/mediawiki/w/index.php(3)require(string)
#11{main}
Impact

A large initial spike of PHP warnings (~ 240) following wmf.4 promotion to group0. The rate quickly subsided but this error is still occuring.

Notes

The git blame for the first frame points to https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/1149741 as the likely culprit (task T387093). (cc'ing author and reviewer for triage)

Details

Request URL
https://auth.wikimedia.org/mediawikiwiki/wiki/Special:CreateAccount?centralauthLoginToken=*&returnto=*&useformat=*&usesul3=*
Related Changes in Gerrit:

Event Timeline

Change #1153339 had a related patch set uploaded (by D3r1ck01; author: Derick Alangi):

[mediawiki/extensions/CentralAuth@master] Use default preference if no client preference in auth request

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

Change #1153350 had a related patch set uploaded (by Bartosz Dziewoński; author: Derick Alangi):

[mediawiki/extensions/CentralAuth@wmf/1.45.0-wmf.4] Use default preference if no client preference in auth request

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

Apart from a log warning, this doesn't have any bad effects, and it does not have to block the train. (I scheduled a backport, but I'm not sure if we'll have a chance to deploy it before the next train window.)

Change #1153350 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@wmf/1.45.0-wmf.4] Use default preference if no client preference in auth request

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

Mentioned in SAL (#wikimedia-operations) [2025-06-03T20:53:13Z] <cjming@deploy1003> Started scap sync-world: Backport for [[gerrit:1153350|Use default preference if no client preference in auth request (T395957)]]

Mentioned in SAL (#wikimedia-operations) [2025-06-03T20:55:19Z] <cjming@deploy1003> matmarex, cjming: Backport for [[gerrit:1153350|Use default preference if no client preference in auth request (T395957)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Change #1153339 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Use default preference if no client preference in auth request

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

Mentioned in SAL (#wikimedia-operations) [2025-06-03T21:03:02Z] <cjming@deploy1003> Finished scap sync-world: Backport for [[gerrit:1153350|Use default preference if no client preference in auth request (T395957)]] (duration: 09m 49s)