Page MenuHomePhabricator

CentralAuth on ruwiki: TypeError: Unsupported operand types: array + null
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • service.version: 1.46.0-wmf.14
  • timestamp: 2026-02-05T13:33:52.074Z
  • labels.phpversion: 8.3.30
  • trace.id: 5627c13d-31b9-458a-84dc-88b0ae4be846
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   TypeError: Unsupported operand types: array + null
FrameLocationCall
from/srv/mediawiki/php-1.46.0-wmf.14/includes/Skin/SkinTemplate.php(429)
#0/srv/mediawiki/php-1.46.0-wmf.14/includes/Skin/SkinTemplate.php(377)MediaWiki\Skin\SkinTemplate->buildPersonalUrls()
#1/srv/mediawiki/php-1.46.0-wmf.14/extensions/CentralAuth/includes/Special/SpecialCentralAutoLogin.php(237)MediaWiki\Skin\SkinTemplate->makePersonalToolsList()
#2/srv/mediawiki/php-1.46.0-wmf.14/includes/SpecialPage/SpecialPage.php(711)MediaWiki\Extension\CentralAuth\Special\SpecialCentralAutoLogin->execute(string)
#3/srv/mediawiki/php-1.46.0-wmf.14/includes/SpecialPage/SpecialPageFactory.php(1748)MediaWiki\SpecialPage\SpecialPage->run(string)
#4/srv/mediawiki/php-1.46.0-wmf.14/includes/Actions/ActionEntryPoint.php(504)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#5/srv/mediawiki/php-1.46.0-wmf.14/includes/Actions/ActionEntryPoint.php(144)MediaWiki\Actions\ActionEntryPoint->performRequest()
#6/srv/mediawiki/php-1.46.0-wmf.14/includes/MediaWikiEntryPoint.php(180)MediaWiki\Actions\ActionEntryPoint->execute()
#7/srv/mediawiki/php-1.46.0-wmf.14/index.php(44)MediaWiki\MediaWikiEntryPoint->run()
#8/srv/mediawiki/w/index.php(3)require(string)
#9{main}
Impact

That solely happens on ruwiki and we had 25 of them since promoting to all wikis. I do not know about the consequence, maybe people don't get logged in properly or it just an issue when creating the personal URLs?

Notes

Details

Request URL
https://ru.wikipedia.org/wiki/Special:CentralAutoLogin/toolslist?returnto=*&returntoquery=*
Related Changes in Gerrit:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1237272 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] TypeError: Unsupported operand types: array + null

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

Tgr subscribed.

The error is actually in SkinTemplate.

For this specific stack trace, the impact is your user toolbar not being updated when you get logged in automatically. That is not very significant, no need to block deployment because of it. SkinTemplate might error out in other situations though.

(It does seem to be only happening on Special:CentralAutoLogin/toolslist so far.)

Thank you @Tgr for the triage, much appreciated :] I'll remove it from the blockers.

I can't replicate this locally, but this fix is logical since notifications key may not exist in certain skins if they don't support it cc @Ammarpad

I can reproduce. The key is deleted by Vector legacy. I believe ruwiki still uses it as the default skin.

In T416619#11588776, Ammarpad wrote:

I can reproduce. The key is deleted by Vector legacy. I believe ruwiki still uses it as the default skin.

They do. Actually, it was my first thought reading the blockers task that if it happens only there, the old skin could be very possibly the problem.

I can reproduce. The key is deleted by Vector legacy. I believe ruwiki still uses it as the default skin.

Where is it deleted by Vector legacy ? Can you point me to the code and provide some reproduction instructions?

Change #1237302 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Vector legacy: empty rather than unset

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

Change #1237302 abandoned by Jdlrobson:

[mediawiki/skins/Vector@master] Vector legacy: empty rather than unset

Reason:

Recommendation is https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1237272 for now.

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

Change #1237272 merged by jenkins-bot:

[mediawiki/core@master] TypeError: Unsupported operand types: array + null

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

Change #1237489 had a related patch set uploaded (by Hashar; author: Jdlrobson):

[mediawiki/core@wmf/1.46.0-wmf.14] TypeError: Unsupported operand types: array + null

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

Thank you @pmiazga, I will reach out to SRE and handle the backport.

I have exchanged with federico3, one of the SRE on call and he kindly approved of it. During our discussion we noted I have mentioned the change got reproduced which led to the test and that were reviews by multiple people.

A point to note is that SkinTemplate::buildPersonalUrls() has no test coverage for either the loggedin or not loggedin paths: https://doc.wikimedia.org/cover/mediawiki-core/includes/Skin/SkinTemplate.php.html#424 . That would not have caught that specific issue which originate from Vector rather than core. Even though the code base is several years old, i might benefit some unit tests, since the hotfix having a test helps building some level of confidence ;]

Change #1237489 merged by jenkins-bot:

[mediawiki/core@wmf/1.46.0-wmf.14] TypeError: Unsupported operand types: array + null

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

Mentioned in SAL (#wikimedia-operations) [2026-02-06T14:46:01Z] <hashar@deploy2002> Started scap sync-world: Backport for [[gerrit:1237489|TypeError: Unsupported operand types: array + null (T416619)]]

Mentioned in SAL (#wikimedia-operations) [2026-02-06T14:50:28Z] <hashar@deploy2002> hashar: Backport for [[gerrit:1237489|TypeError: Unsupported operand types: array + null (T416619)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-02-06T14:57:24Z] <hashar@deploy2002> Finished scap sync-world: Backport for [[gerrit:1237489|TypeError: Unsupported operand types: array + null (T416619)]] (duration: 11m 23s)

I have deployed the fix and the error is gone. Thank you!

I am not sure whom to assigning the task to, so I am leaving it unassigned.