Page MenuHomePhabricator

APIEditPage -> ApiBase->checkTitleUserPermissions PHP Warning: Invalid operand type was used: Invalid type used as key
Closed, ResolvedPublic

Description

Error

Request ID: XHhSqgpAMEQAAH7N4bYAAADG

message
PHP Warning: Invalid operand type was used: Invalid type used as key
/srv/mediawiki/php-1.33.0-wmf.19/includes/api/ApiBase.php:1808
trace
#0 /srv/mediawiki/php-1.33.0-wmf.19/includes/api/ApiBase.php(1808): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.33.0-wmf.19/includes/api/ApiBase.php(2146): ApiBase->errorArrayToStatus(array, User)
#2 /srv/mediawiki/php-1.33.0-wmf.19/includes/api/ApiEditPage.php(121): ApiBase->checkTitleUserPermissions(Title, string, array)
#3 /srv/mediawiki/php-1.33.0-wmf.19/includes/api/ApiMain.php(1596): ApiEditPage->execute()
#4 /srv/mediawiki/php-1.33.0-wmf.19/includes/api/ApiMain.php(531): ApiMain->executeAction()
#5 /srv/mediawiki/php-1.33.0-wmf.19/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()
#6 /srv/mediawiki/php-1.33.0-wmf.19/api.php(87): ApiMain->execute()
#7 /srv/mediawiki/w/api.php(3): include(string)
#8 {main}

Impact

Notes

Spotted on itwiki and metawiki

Details

Related Gerrit Patches:

Event Timeline

hashar created this task.Feb 28 2019, 9:54 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 28 2019, 9:54 PM
Anomie claimed this task.Mar 1 2019, 2:40 PM
Anomie added a subscriber: Anomie.

Hmm, probably somehow we're getting an array where the first element is a Message object there. I'll add a check for that.

Change 493700 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] API: Handle Messages in errorArrayToStatus()

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

Change 493700 merged by jenkins-bot:
[mediawiki/core@master] API: Handle Messages in errorArrayToStatus()

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

Anomie closed this task as Resolved.Mar 4 2019, 8:34 PM

Feel free to backport if riding the train this week isn't fast enough. Since this wasn't UBN I'm guessing it's not that common.

Catrope added subscribers: Catrope, Stashbot.

This rose in frequency today because someone has been repeatedly attempting to create a page on mswiki and tripping the TitleBlacklist entry about Armenian characters. Details in T217615: Invalid operand type was used: Invalid type used as key in ApiBase.php.

Change 494401 had a related patch set uploaded (by Catrope; owner: Anomie):
[mediawiki/core@wmf/1.33.0-wmf.19] API: Handle Messages in errorArrayToStatus()

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

Change 494401 merged by jenkins-bot:
[mediawiki/core@wmf/1.33.0-wmf.19] API: Handle Messages in errorArrayToStatus()

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

Mentioned in SAL (#wikimedia-operations) [2019-03-05T03:05:00Z] <catrope@deploy1001> Synchronized php-1.33.0-wmf.19/includes/api/ApiBase.php: Handle TitleBlacklist errors correctly (T217382) (duration: 00m 49s)

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:07 PM