Page MenuHomePhabricator

array_merge(): Argument #2 is not an array
Closed, ResolvedPublic

Description

Two instances of this error in rt testing:

  • /w/rest.php/ko.wikipedia.org/v3/transform/wikitext/to/pagebundle/%EA%B9%80%EC%A0%95%ED%9D%AC_%EC%A2%85%EA%B0%80_%EC%9C%A0%EB%AC%BC_%EC%9D%BC%EA%B4%84/
  • /w/rest.php/ko.wikipedia.org/v3/transform/wikitext/to/pagebundle/MBC%20%EB%89%B4%EC%8A%A4%EB%8D%B0%EC%8A%A4%ED%81%AC/

Exception trace:

#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/deployment/parsoid/deploy/src/src/Wt2Html/TT/WikiLinkHandler.php(348): array_merge(array, string, array)
#2 /srv/deployment/parsoid/deploy/src/src/Wt2Html/TT/WikiLinkHandler.php(1617): Parsoid\Wt2Html\TT\WikiLinkHandler->onWikiLink(Parsoid\Tokens\SelfclosingTagTk)
#3 /srv/deployment/parsoid/deploy/src/src/Wt2Html/TT/TokenHandler.php(211): Parsoid\Wt2Html\TT\WikiLinkHandler->onTag(Parsoid\Tokens\SelfclosingTagTk)
#4 /srv/deployment/parsoid/deploy/src/src/Wt2Html/TokenTransformManager.php(120): Parsoid\Wt2Html\TT\TokenHandler->process(array)
#5 /srv/deployment/parsoid/deploy/src/src/Wt2Html/TokenTransformManager.php(182): Parsoid\Wt2Html\TokenTransformManager->processChunk(array)
#6 /srv/deployment/parsoid/deploy/src/src/Wt2Html/ParserPipeline.php(127): Parsoid\Wt2Html\TokenTransformManager->process(array, array)
#7 /srv/deployment/parsoid/deploy/src/src/Utils/PipelineUtils.php(110): Parsoid\Wt2Html\ParserPipeline->parse(string, array)
#8 /srv/deployment/parsoid/deploy/src/src/Config/ParsoidExtensionAPI.php(158): Parsoid\Utils\PipelineUtils::processContentInPipeline(Parsoid\Config\Env, Parsoid\Wt2Html\PageConfigFrame, string, array)
#9 /srv/deployment/parsoid/deploy/src/src/Config/ParsoidExtensionAPI.php(189): Parsoid\Config\ParsoidExtensionAPI->parseWikitextToDOM(string, array, boolean)
#10 /srv/deployment/parsoid/deploy/src/src/Ext/Cite/Ref.php(48): Parsoid\Config\ParsoidExtensionAPI->parseTokenContentsToDOM(array, string, string, array)
#11 /srv/deployment/parsoid/deploy/src/src/Wt2Html/TT/ExtensionHandler.php(183): Parsoid\Ext\Cite\Ref->toDOM(Parsoid\Config\ParsoidExtensionAPI, string, array)
#12 /srv/deployment/parsoid/deploy/src/src/Wt2Html/TT/ExtensionHandler.php(310): Parsoid\Wt2Html\TT\ExtensionHandler->onExtension(Parsoid\Tokens\SelfclosingTagTk)
#13 /srv/deployment/parsoid/deploy/src/src/Wt2Html/TT/TokenHandler.php(211): Parsoid\Wt2Html\TT\ExtensionHandler->onTag(Parsoid\Tokens\SelfclosingTagTk)
#14 /srv/deployment/parsoid/deploy/src/src/Wt2Html/TokenTransformManager.php(120): Parsoid\Wt2Html\TT\TokenHandler->process(array)
#15 /srv/deployment/parsoid/deploy/src/src/Wt2Html/TokenTransformManager.php(192): Parsoid\Wt2Html\TokenTransformManager->processChunk(array)
#16 /srv/deployment/parsoid/deploy/src/src/Wt2Html/TokenTransformManager.php(190): Parsoid\Wt2Html\TokenTransformManager->processChunkily(string, array)
#17 /srv/deployment/parsoid/deploy/src/src/Wt2Html/HTML5TreeBuilder.php(431): Parsoid\Wt2Html\TokenTransformManager->processChunkily(string, array)
#18 [internal function]: Parsoid\Wt2Html\HTML5TreeBuilder->processChunkily(string, array)
#19 /srv/deployment/parsoid/deploy/src/src/Wt2Html/DOMPostProcessor.php(883): Generator->current()
#20 /srv/deployment/parsoid/deploy/src/src/Wt2Html/ParserPipeline.php(148): Parsoid\Wt2Html\DOMPostProcessor->processChunkily(string, array)
#21 /srv/deployment/parsoid/deploy/src/src/Wt2Html/ParserPipeline.php(198): Parsoid\Wt2Html\ParserPipeline->parseChunkily(string, array)
#22 /srv/deployment/parsoid/deploy/src/src/Wt2Html/ParserPipelineFactory.php(308): Parsoid\Wt2Html\ParserPipeline->parseToplevelDoc(string, array)
#23 /srv/deployment/parsoid/deploy/src/src/WikitextContentModelHandler.php(73): Parsoid\Wt2Html\ParserPipelineFactory->parse(string)
#24 /srv/deployment/parsoid/deploy/src/src/Parsoid.php(56): Parsoid\WikitextContentModelHandler->toHTML(Parsoid\Config\Env)
#25 /srv/deployment/parsoid/deploy/src/src/Parsoid.php(77): Parsoid\Parsoid->parseWikitext(MWParsoid\Config\PageConfig, array)
#26 /srv/deployment/parsoid/deploy/src/extension/src/Rest/Handler/ParsoidHandler.php(427): Parsoid\Parsoid->wikitext2html(MWParsoid\Config\PageConfig, array)
#27 /srv/deployment/parsoid/deploy/src/extension/src/Rest/Handler/TransformHandler.php(64): MWParsoid\Rest\Handler\ParsoidHandler->wt2html(Parsoid\Config\Env, array, string)
#28 /srv/mediawiki/php-1.34.0-wmf.23/includes/Rest/Router.php(307): MWParsoid\Rest\Handler\TransformHandler->execute()
#29 /srv/mediawiki/php-1.34.0-wmf.23/includes/Rest/Router.php(286): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\TransformHandler)
#30 /srv/mediawiki/php-1.34.0-wmf.23/includes/Rest/EntryPoint.php(112): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#31 /srv/mediawiki/php-1.34.0-wmf.23/includes/Rest/EntryPoint.php(79): MediaWiki\Rest\EntryPoint->execute()
#32 /srv/mediawiki/php-1.34.0-wmf.23/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#33 /srv/mediawiki/w/rest.php(3): require(string)
#34 {main}

Details

Related Gerrit Patches:
mediawiki/services/parsoid : masterFix porting Array concat to array_merge

Event Timeline

ssastry created this task.Sep 25 2019, 2:03 PM
Restricted Application added subscribers: revi, Aklapper. · View Herald TranscriptSep 25 2019, 2:03 PM
ssastry triaged this task as Medium priority.Sep 25 2019, 2:05 PM
ssastry moved this task from Backlog to Bugs on the Parsoid-PHP board.
Arlolra claimed this task.Sep 25 2019, 5:08 PM

Change 539164 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Fix porting Array concat to array_merge

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

Change 539164 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Fix porting Array concat to array_merge

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

Arlolra closed this task as Resolved.Sep 25 2019, 5:28 PM