Page MenuHomePhabricator

Translator.php: Argument 1 passed to ContentTranslation\Translator::__construct() must be an instance of User, boolean given
Closed, DuplicatePublicPRODUCTION ERROR

Description

Error
message
[XWfnCQpAMDgAALoy4EcAAABY] /w/api.php?action=query&list=cxtranslatorstats&translator=(select(0)from(select(sleep(6)))v)/*'%2b(select(0)from(select(sleep(6)))v)%2b'"%2b(select(0)from(select(sleep(6)))v)%2b"*/   TypeError from line 12 of /srv/mediawiki/php-1.34.0-wmf.19/extensions/ContentTranslation/includes/Translator.php: Argument 1 passed to ContentTranslation\Translator::__construct() must be an instance of User, boolean given, called in /srv/mediawiki/php-1.34.0-wmf.19/extensions/ContentTranslation/api/ApiQueryTranslatorStats.php on line 27
Impact

23 hits in wmf.19. Not seen before.

Notes

Similar or duplicate of T231544: ApiQueryTranslatorStats.php: Argument 1 passed to ContentTranslation\Translator::__construct() must be an instance of User, bool given?

Details

Request ID
XWfnCQpAMDgAALoy4EcAAABY
Request URL
bh.wikipedia.org/w/api.php?action=query&list=cxtranslatorstats&translator=(select(0)from(select(sleep(6)))v)/*'%2b(select(0)from(select(sleep(6)))v)%2b'"%2b(select(0)from(select(sleep(6)))v)%2b"*/
Stack Trace
trace
#0 /srv/mediawiki/php-1.34.0-wmf.19/extensions/ContentTranslation/api/ApiQueryTranslatorStats.php(27): ContentTranslation\Translator->__construct(boolean)
#1 /srv/mediawiki/php-1.34.0-wmf.19/includes/api/ApiQuery.php(250): ApiQueryTranslatorStats->execute()
#2 /srv/mediawiki/php-1.34.0-wmf.19/includes/api/ApiMain.php(1589): ApiQuery->execute()
#3 /srv/mediawiki/php-1.34.0-wmf.19/includes/api/ApiMain.php(533): ApiMain->executeAction()
#4 /srv/mediawiki/php-1.34.0-wmf.19/includes/api/ApiMain.php(504): ApiMain->executeActionWithErrorHandling()
#5 /srv/mediawiki/php-1.34.0-wmf.19/api.php(86): ApiMain->execute()
#6 /srv/mediawiki/w/api.php(3): require(string)
#7 {main}

Event Timeline

zeljkofilipin renamed this task from Translator.php: Argument 1 passed to ContentTranslation\Translator::__construct() must be an instance of User, boolean giv to Translator.php: Argument 1 passed to ContentTranslation\Translator::__construct() must be an instance of User, boolean given.Aug 29 2019, 3:31 PM

Removed from train blockers since it only happened in wmf.19. Feel free to merge with T231544 if you think it's a duplicate.

The trace is the same. The small difference in the message is likely hhvm vs. php difference.