Page MenuHomePhabricator

PHP Notice: Array to string conversion in Scribunto
Open, Needs TriagePublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   PHP Notice: Array to string conversion
error.stack_trace
from /srv/mediawiki/php-1.41.0-wmf.22/extensions/Scribunto/includes/ApiScribuntoConsole.php(132)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.41.0-wmf.22/extensions/Scribunto/includes/ApiScribuntoConsole.php(132): strval(array)
#2 /srv/mediawiki/php-1.41.0-wmf.22/extensions/Scribunto/includes/ApiScribuntoConsole.php(77): MediaWiki\Extension\Scribunto\ApiScribuntoConsole->runConsole(array)
#3 /srv/mediawiki/php-1.41.0-wmf.22/includes/api/ApiMain.php(1921): MediaWiki\Extension\Scribunto\ApiScribuntoConsole->execute()
#4 /srv/mediawiki/php-1.41.0-wmf.22/includes/api/ApiMain.php(898): ApiMain->executeAction()
#5 /srv/mediawiki/php-1.41.0-wmf.22/includes/api/ApiMain.php(869): ApiMain->executeActionWithErrorHandling()
#6 /srv/mediawiki/php-1.41.0-wmf.22/api.php(95): ApiMain->execute()
#7 /srv/mediawiki/php-1.41.0-wmf.22/api.php(48): wfApiMain()
#8 /srv/mediawiki/w/api.php(3): require(string)
#9 {main}
Impact
Notes

Details

Request URL
https://ru.wikisource.org/w/api.php

Event Timeline

The return value from ScribuntoEngineBase::runConsole is used here, the type for the return key is not specified in docs.

It is build up by a LuaInterpreter::callFunction return value, which does not docs it return anything nor it type.
But the interpreter is calling the lua function specified at the console. Without the payload from the get/post it is not possible to tell if a internal lua function returns the wrong object or what happens else. For me the error depends on the used input and the input is possible a wild range of things, without the input it not easy/possible to look further for me.