Page MenuHomePhabricator

PHP Warning: array_key_exists(): The first argument should be either a string or an integer
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.36

message
PHP Warning: array_key_exists(): The first argument should be either a string or an integer

Details

Request ID
0a4518f3-ad4d-47d5-ab40-2d42536b804c
Request URL
https://it.wikisource.org/w/api.php
Stack Trace
exception.trace
from /srv/mediawiki/php-1.36.0-wmf.36/extensions/ProofreadPage/includes/Pagination/FilePagination.php(109)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.36.0-wmf.36/extensions/ProofreadPage/includes/Pagination/FilePagination.php(109): array_key_exists(double, array)
#2 /srv/mediawiki/php-1.36.0-wmf.36/extensions/ProofreadPage/includes/Parser/PagesTagParser.php(177): ProofreadPage\Pagination\FilePagination->getPageTitle(double)
#3 /srv/mediawiki/php-1.36.0-wmf.36/extensions/ProofreadPage/includes/ProofreadPage.php(139): ProofreadPage\Parser\PagesTagParser->render(array)
#4 /srv/mediawiki/php-1.36.0-wmf.36/includes/parser/Parser.php(3971): ProofreadPage\ProofreadPage::ProofreadPage\{closure}(NULL, array, Parser, PPFrame_Hash)
#5 /srv/mediawiki/php-1.36.0-wmf.36/includes/parser/PPFrame_Hash.php(341): Parser->extensionSubstitution(array, PPFrame_Hash)
#6 /srv/mediawiki/php-1.36.0-wmf.36/includes/parser/Parser.php(2879): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#7 /srv/mediawiki/php-1.36.0-wmf.36/includes/parser/Parser.php(1549): Parser->replaceVariables(string)
#8 /srv/mediawiki/php-1.36.0-wmf.36/includes/parser/Parser.php(639): Parser->internalParse(string)
#9 /srv/mediawiki/php-1.36.0-wmf.36/includes/content/WikitextContent.php(375): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
#10 /srv/mediawiki/php-1.36.0-wmf.36/includes/content/AbstractContent.php(591): WikitextContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
#11 /srv/mediawiki/php-1.36.0-wmf.36/includes/Revision/RenderedRevision.php(266): AbstractContent->getParserOutput(Title, NULL, ParserOptions, boolean)
#12 /srv/mediawiki/php-1.36.0-wmf.36/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#13 /srv/mediawiki/php-1.36.0-wmf.36/includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#14 /srv/mediawiki/php-1.36.0-wmf.36/includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#15 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#16 /srv/mediawiki/php-1.36.0-wmf.36/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#17 /srv/mediawiki/php-1.36.0-wmf.36/includes/Storage/DerivedPageDataUpdater.php(1349): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#18 [internal function]: MediaWiki\Storage\DerivedPageDataUpdater->getCanonicalParserOutput()
#19 /srv/mediawiki/php-1.36.0-wmf.36/includes/edit/PreparedEdit.php(104): call_user_func(array)
#20 /srv/mediawiki/php-1.36.0-wmf.36/includes/edit/PreparedEdit.php(119): MediaWiki\Edit\PreparedEdit->getOutput()
#21 /srv/mediawiki/php-1.36.0-wmf.36/includes/Storage/DerivedPageDataUpdater.php(1327): MediaWiki\Edit\PreparedEdit->__get(string)
#22 /srv/mediawiki/php-1.36.0-wmf.36/includes/page/WikiPage.php(2318): MediaWiki\Storage\DerivedPageDataUpdater->getPreparedEdit()
#23 /srv/mediawiki/php-1.36.0-wmf.36/includes/Storage/PageEditStash.php(137): WikiPage->prepareContentForEdit(WikitextContent, NULL, User, string, boolean)
#24 /srv/mediawiki/php-1.36.0-wmf.36/includes/api/ApiStashEdit.php(189): MediaWiki\Storage\PageEditStash->parseAndCache(WikiPage, WikitextContent, User, string)
#25 /srv/mediawiki/php-1.36.0-wmf.36/includes/api/ApiMain.php(1647): ApiStashEdit->execute()
#26 /srv/mediawiki/php-1.36.0-wmf.36/includes/api/ApiMain.php(617): ApiMain->executeAction()
#27 /srv/mediawiki/php-1.36.0-wmf.36/includes/api/ApiMain.php(588): ApiMain->executeActionWithErrorHandling()
#28 /srv/mediawiki/php-1.36.0-wmf.36/api.php(90): ApiMain->execute()
#29 /srv/mediawiki/php-1.36.0-wmf.36/api.php(45): wfApiMain()
#30 /srv/mediawiki/w/api.php(3): require(string)
#31 {main}

and

exception.trace
from /srv/mediawiki/php-1.36.0-wmf.36/extensions/ProofreadPage/includes/Pagination/PageList.php(38)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.36.0-wmf.36/extensions/ProofreadPage/includes/Pagination/PageList.php(38): array_key_exists(double, array)
#2 /srv/mediawiki/php-1.36.0-wmf.36/extensions/ProofreadPage/includes/Pagination/FilePagination.php(89): ProofreadPage\Pagination\PageList->getNumber(double)
#3 /srv/mediawiki/php-1.36.0-wmf.36/extensions/ProofreadPage/includes/Parser/PagesTagParser.php(176): ProofreadPage\Pagination\FilePagination->getDisplayedPageNumber(double)
#4 /srv/mediawiki/php-1.36.0-wmf.36/extensions/ProofreadPage/includes/ProofreadPage.php(139): ProofreadPage\Parser\PagesTagParser->render(array)
#5 /srv/mediawiki/php-1.36.0-wmf.36/includes/parser/Parser.php(3971): ProofreadPage\ProofreadPage::ProofreadPage\{closure}(NULL, array, Parser, PPFrame_Hash)
#6 /srv/mediawiki/php-1.36.0-wmf.36/includes/parser/PPFrame_Hash.php(341): Parser->extensionSubstitution(array, PPFrame_Hash)
#7 /srv/mediawiki/php-1.36.0-wmf.36/includes/parser/Parser.php(2879): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#8 /srv/mediawiki/php-1.36.0-wmf.36/includes/parser/Parser.php(1549): Parser->replaceVariables(string)
#9 /srv/mediawiki/php-1.36.0-wmf.36/includes/parser/Parser.php(639): Parser->internalParse(string)
#10 /srv/mediawiki/php-1.36.0-wmf.36/includes/content/WikitextContent.php(375): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
#11 /srv/mediawiki/php-1.36.0-wmf.36/includes/content/AbstractContent.php(591): WikitextContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
#12 /srv/mediawiki/php-1.36.0-wmf.36/includes/Revision/RenderedRevision.php(266): AbstractContent->getParserOutput(Title, NULL, ParserOptions, boolean)
#13 /srv/mediawiki/php-1.36.0-wmf.36/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#14 /srv/mediawiki/php-1.36.0-wmf.36/includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#15 /srv/mediawiki/php-1.36.0-wmf.36/includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#16 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#17 /srv/mediawiki/php-1.36.0-wmf.36/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#18 /srv/mediawiki/php-1.36.0-wmf.36/includes/Storage/DerivedPageDataUpdater.php(1349): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#19 [internal function]: MediaWiki\Storage\DerivedPageDataUpdater->getCanonicalParserOutput()
#20 /srv/mediawiki/php-1.36.0-wmf.36/includes/edit/PreparedEdit.php(104): call_user_func(array)
#21 /srv/mediawiki/php-1.36.0-wmf.36/includes/edit/PreparedEdit.php(119): MediaWiki\Edit\PreparedEdit->getOutput()
#22 /srv/mediawiki/php-1.36.0-wmf.36/includes/Storage/DerivedPageDataUpdater.php(1327): MediaWiki\Edit\PreparedEdit->__get(string)
#23 /srv/mediawiki/php-1.36.0-wmf.36/includes/page/WikiPage.php(2318): MediaWiki\Storage\DerivedPageDataUpdater->getPreparedEdit()
#24 /srv/mediawiki/php-1.36.0-wmf.36/includes/Storage/PageEditStash.php(137): WikiPage->prepareContentForEdit(WikitextContent, NULL, User, string, boolean)
#25 /srv/mediawiki/php-1.36.0-wmf.36/includes/api/ApiStashEdit.php(189): MediaWiki\Storage\PageEditStash->parseAndCache(WikiPage, WikitextContent, User, string)
#26 /srv/mediawiki/php-1.36.0-wmf.36/includes/api/ApiMain.php(1647): ApiStashEdit->execute()
#27 /srv/mediawiki/php-1.36.0-wmf.36/includes/api/ApiMain.php(617): ApiMain->executeAction()
#28 /srv/mediawiki/php-1.36.0-wmf.36/includes/api/ApiMain.php(588): ApiMain->executeActionWithErrorHandling()
#29 /srv/mediawiki/php-1.36.0-wmf.36/api.php(90): ApiMain->execute()
#30 /srv/mediawiki/php-1.36.0-wmf.36/api.php(45): wfApiMain()
#31 /srv/mediawiki/w/api.php(3): require(string)
#32 {main}

Event Timeline

Is this a regression in .36 ?

Krinkle added a subscriber: Krinkle.

ProofreadPage has a class named "Parser", but this is not The Parser™.

Change 674758 had a related patch set uploaded (by Sohom Datta; author: Sohom Datta):
[mediawiki/extensions/ProofreadPage@master] Convert decimal from= and to= to integers in pages tag

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

Change 674758 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] Disallow negative or decimal values in pages tag

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

Change 674834 had a related patch set uploaded (by Hashar; author: Sohom Datta):
[mediawiki/extensions/ProofreadPage@wmf/1.36.0-wmf.36] Disallow negative or decimal values in pages tag

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

Change 674834 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@wmf/1.36.0-wmf.36] Disallow negative or decimal values in pages tag

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

Mentioned in SAL (#wikimedia-operations) [2021-03-25T16:13:06Z] <hashar@deploy1002> Synchronized php-1.36.0-wmf.36/extensions/ProofreadPage: Disallow negative or decimal values in pages tag - T278400 (duration: 01m 32s)

hashar claimed this task.

Deployed ;)