Page MenuHomePhabricator

SpecialBlock: MapCacheLRU.php: array_key_exists(): The first argument should be either a string or an integer
Closed, ResolvedPublicPRODUCTION ERROR

Description

Going to Special:Block with a username filled gives

[error] [6f820a4c2fffa2cd6e7b868f] /wiki/index.php/Special:Block/Newuser ErrorException from line 90 of /var/www/html/wiki/includes/libs/MapCacheLRU.php: PHP Warning: array_key_exists(): The first argument should be either a string or an integer
[error] [6f820a4c2fffa2cd6e7b868f] /wiki/index.php/Special:Block/Newuser ErrorException from line 61 of /var/www/html/wiki/includes/libs/MapCacheLRU.php: PHP Warning: array_key_exists(): The first argument should be either a string or an integer
[error] [6f820a4c2fffa2cd6e7b868f] /wiki/index.php/Special:Block/Newuser ErrorException from line 68 of /var/www/html/wiki/includes/libs/MapCacheLRU.php: PHP Warning: Illegal offset type

Happens on Wikimedia production as well:

28 Illegal offset type in /srv/mediawiki/php-1.27.0-wmf.21/includes/libs/MapCacheLRU.php on line 68
28 Array key should be either a string or an integer in /srv/mediawiki/php-1.27.0-wmf.21/includes/libs/MapCacheLRU.php on line 90
28 Array key should be either a string or an integer in /srv/mediawiki/php-1.27.0-wmf.21/includes/libs/MapCacheLRU.php on line 61

Event Timeline

SpecialBlock->target can be User|string|null but OtherBlockLogLink hook's second parameter says it's supposed to be a requested IP address or username.

Change 286181 had a related patch set uploaded (by Glaisher):
Make sure OtherBlockLogLink's second parameter is a string

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

Change 286181 merged by jenkins-bot:
Make sure OtherBlockLogLink's second parameter is a string

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

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