SemanticMediaWiki / SemanticScribunto

Provides service functions to support the Scribunto extension
Other
23 stars 14 forks source link

TypeError: Argument 1 passed to SMW\Scribunto\ScribuntoLuaLibrary::processLuaArguments() #99

Closed jaideraf closed 1 month ago

jaideraf commented 1 month ago

Setup and configuration

Issue

Produces a stack trace and outputs:

TypeError: Argument 1 passed to SMW\Scribunto\ScribuntoLuaLibrary::processLuaArguments() must be an instance of SMW\Scribunto\mixed, string given, called in /w/extensions/SemanticScribunto/src/ScribuntoLuaLibrary.php on line 65

Backtrace:

from w/extensions/SemanticScribunto/src/ScribuntoLuaLibrary.php(353)
#0 w/extensions/SemanticScribunto/src/ScribuntoLuaLibrary.php(65): SMW\Scribunto\ScribuntoLuaLibrary->processLuaArguments()
#1 w/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxCallback.php(31): SMW\Scribunto\ScribuntoLuaLibrary->ask()
#2 [internal function]: MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxCallback->__call()
#3 w/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxInterpreter.php(136): LuaSandboxFunction->call()
#4 w/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(302): MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxInterpreter->callFunction()
#5 w/extensions/Scribunto/includes/engines/LuaCommon/LuaModule.php(71): Scribunto_LuaEngine->executeFunctionChunk()
#6 w/extensions/Scribunto/includes/Hooks.php(158): Scribunto_LuaModule->invoke()
#7 w/includes/parser/Parser.php(3437): MediaWiki\Extension\Scribunto\Hooks::invokeHook()
#8 w/includes/parser/Parser.php(3122): Parser->callParserFunction()
#9 w/includes/parser/PPFrame_Hash.php(275): Parser->braceSubstitution()
#10 w/includes/parser/Parser.php(2951): PPFrame_Hash->expand()
#11 w/includes/parser/Parser.php(1609): Parser->replaceVariables()
#12 w/includes/parser/Parser.php(723): Parser->internalParse()
#13 w/includes/content/WikitextContentHandler.php(301): Parser->parse()
#14 w/includes/content/ContentHandler.php(1721): WikitextContentHandler->fillParserOutput()
#15 w/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput()
#16 w/includes/Revision/RenderedRevision.php(266): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()
#17 w/includes/Revision/RenderedRevision.php(237): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
#18 w/includes/Revision/RevisionRenderer.php(221): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
#19 w/includes/Revision/RevisionRenderer.php(158): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
#20 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()
#21 w/includes/Revision/RenderedRevision.php(199): call_user_func()
#22 w/includes/poolcounter/PoolWorkArticleView.php(91): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#23 w/includes/poolcounter/PoolWorkArticleViewCurrent.php(97): PoolWorkArticleView->renderRevision()
#24 w/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleViewCurrent->doWork()
#25 w/includes/page/ParserOutputAccess.php(299): PoolCounterWork->execute()
#26 w/includes/page/Article.php(714): MediaWiki\Page\ParserOutputAccess->getParserOutput()
#27 w/includes/page/Article.php(528): Article->generateContentOutput()
#28 w/includes/actions/ViewAction.php(78): Article->view()
#29 w/includes/MediaWiki.php(542): ViewAction->show()
#30 w/includes/MediaWiki.php(322): MediaWiki->performAction()
#31 w/includes/MediaWiki.php(904): MediaWiki->performRequest()
#32 w/includes/MediaWiki.php(562): MediaWiki->main()
#33 w/index.php(50): MediaWiki->run()
#34 w/index.php(46): wfIndexMain()
#35 {main}
oetterer commented 1 month ago

Thanks for letting me know. Looks like I need to test against php7.4. I will look into this.

oetterer commented 1 month ago

release 2.3.2 (commit 027e333732cb37b9726e2a9dc45ccbd947e6775f) should fix the problem.

jaideraf commented 1 month ago

Thank you! Fixed indeed. 👍🏼