Page MenuHomePhabricator

ApiQueryMapData.php: PHP Notice: Cannot access property on non-object
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

Request ID: XWaD2ApAMEIAAL2JpVkAAACV
Request URL: commons.wikimedia.org/w/api.php...

message
[XWaD2ApAMEIAAL2JpVkAAACV] /w/api.php?format=json&formatversion=2&action=query&titles=Category%3ABeijing&prop=mapdata&mpdlimit=max&mpdgroups=_e687dc308106cb092ed32bfec352dd36897d4a9e   ErrorException from line 48 of /srv/mediawiki/php-1.34.0-wmf.20/extensions/Kartographer/includes/ApiQueryMapData.php: PHP Notice: Cannot access property on non-object
trace
#0 /srv/mediawiki/php-1.34.0-wmf.20/extensions/Kartographer/includes/ApiQueryMapData.php(48): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.34.0-wmf.20/includes/api/ApiQuery.php(250): Kartographer\ApiQueryMapData->execute()
#2 /srv/mediawiki/php-1.34.0-wmf.20/includes/api/ApiMain.php(1595): ApiQuery->execute()
#3 /srv/mediawiki/php-1.34.0-wmf.20/includes/api/ApiMain.php(533): ApiMain->executeAction()
#4 /srv/mediawiki/php-1.34.0-wmf.20/includes/api/ApiMain.php(504): ApiMain->executeActionWithErrorHandling()
#5 /srv/mediawiki/php-1.34.0-wmf.20/api.php(86): ApiMain->execute()
#6 /srv/mediawiki/w/api.php(3): include(string)
#7 {main}
Impact

2370 hits in the last 30 minutes (after deploying wmf.20 to group 1) 2449 hits in the last 24 hours (after deploying wmf.20 to group 0), not seen before that.

Notes

Blocking the train.

Event Timeline

Change 533031 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/Kartographer@master] Fix array access as object

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

Change 533034 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/Kartographer@wmf/1.34.0-wmf.20] Fix array access as object

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

@Daimona do the above patches resolve the problem?

I haven't tested, but they should. Copying from gerrit,

given that the array_key_exists at the previous line is passing, there's no other possibility than $data being an array. That doesn't exclude further errors in other parts of the code, of course.

Change 533031 merged by jenkins-bot:
[mediawiki/extensions/Kartographer@master] Fix array access as object

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

Change 533034 merged by jenkins-bot:
[mediawiki/extensions/Kartographer@wmf/1.34.0-wmf.20] Fix array access as object

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

Mentioned in SAL (#wikimedia-operations) [2019-08-28T17:14:35Z] <jforrester@deploy1001> Synchronized php-1.34.0-wmf.20/extensions/Kartographer/includes/ApiQueryMapData.php: T231453 Fix array access as object (duration: 00m 54s)

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