Page MenuHomePhabricator

Argument 1 passed to ApiQueryUserInfo::getBlockInfo() must be an instance of Block, null given
Closed, ResolvedPublic

Description

2015-09-01 17:35:16 mw1017 testwiki fatal ERROR: [c288852a] /w/api.php
ErrorException from line 77 of /srv/mediawiki/php-1.26wmf20/includes/api/ApiQueryUserInfo.php:
PHP Error: Argument 1 passed to ApiQueryUserInfo::getBlockInfo() must be an instance of Block, null given

[stacktrace]

#0 /srv/mediawiki/php-1.26wmf20/includes/api/ApiQueryUserInfo.php(77): MWExceptionHandler::handleError(integer, string, string, integer)
#1 /srv/mediawiki/php-1.26wmf20/includes/api/ApiLogin.php(165): ApiQueryUserInfo::getBlockInfo(NULL)
#2 /srv/mediawiki/php-1.26wmf20/includes/api/ApiMain.php(1093): ApiLogin->execute()
#3 /srv/mediawiki/php-1.26wmf20/includes/api/ApiMain.php(432): ApiMain->executeAction()
#4 /srv/mediawiki/php-1.26wmf20/includes/api/ApiMain.php(405): ApiMain->executeActionWithErrorHandling()
#5 /srv/mediawiki/php-1.26wmf20/api.php(88): ApiMain->execute()
#6 /srv/mediawiki/w/api.php(3): include(string)
#7 {main}

Event Timeline

ori created this task.Sep 1 2015, 5:51 PM
ori raised the priority of this task from to Normal.
ori updated the task description. (Show Details)
ori added subscribers: ori, Anomie.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 1 2015, 5:51 PM
Krenair added a subscriber: Krenair.Sep 1 2015, 6:35 PM
Anomie added a subscriber: Legoktm.Sep 1 2015, 6:47 PM

At first glance I'm going to guess that this might be a login attempt for an account that's locked in CentralAuth but not blocked on the local wiki, and User::getBlock() isn't returning any block for such a user. @Legoktm, you know CentralAuth, does that seem likely?

Change 235460 had a related patch set uploaded (by Anomie):
ApiLogin: Don't try to add block info if there's no block

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

Change 235460 merged by jenkins-bot:
ApiLogin: Don't try to add block info if there's no block

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

Anomie closed this task as Resolved.Sep 2 2015, 2:24 PM
Anomie claimed this task.

At first glance I'm going to guess that this might be a login attempt for an account that's locked in CentralAuth but not blocked on the local wiki, and User::getBlock() isn't returning any block for such a user. @Legoktm, you know CentralAuth, does that seem likely?

Yes :)