Page MenuHomePhabricator

Language: Use of Language::formatNum with a non-numeric string was deprecated in MediaWiki 1.36 (Scribunto formatNum)
Open, Needs TriagePublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.16

message
Use of Language::formatNum with a non-numeric string was deprecated in MediaWiki 1.36. [Called from Language::formatNum]

Impact

1 of these seen since deploy of 1.36.0-wmf.16.

Notes

Another formatNum deprecation notice. At the moment I'm assuming this is low-impact and at this stage won't block the 1.36.0-wmf.16 train (T263182) on it unless it becomes noisier, but I would very much like to see all of these resolved soon. They will quickly accumulate into a real problem for production error triage.

This is happening when Lua code in Scribunto calls core's formatNum with a NaN double value. (Could also happen for positive or negative infinities as well, but all the examples I've looked at have been NaNs.)

Details

Request ID
24ed9587-2ecf-470f-a191-85d689ebf1b4
Request URL
https://ca.wikipedia.org/wiki/Mantoloking
Stack Trace
error.trace
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, string, array)
#1 /srv/mediawiki/php-1.36.0-wmf.16/includes/debug/MWDebug.php(329): trigger_error(string, integer)
#2 /srv/mediawiki/php-1.36.0-wmf.16/includes/debug/MWDebug.php(305): MWDebug::sendRawDeprecated(string, boolean, string)
#3 /srv/mediawiki/php-1.36.0-wmf.16/includes/debug/MWDebug.php(234): MWDebug::deprecatedMsg(string, string, string, integer)
#4 /srv/mediawiki/php-1.36.0-wmf.16/includes/GlobalFunctions.php(1029): MWDebug::deprecated(string, string, string, integer)
#5 /srv/mediawiki/php-1.36.0-wmf.16/languages/Language.php(3286): wfDeprecated(string, string)
#6 /srv/mediawiki/php-1.36.0-wmf.16/languages/Language.php(3265): Language->formatNumInternal(string, boolean, boolean)
#7 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaCommon/LanguageLibrary.php(310): Language->formatNum(double)
#8 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaCommon/LanguageLibrary.php(204): Scribunto_LuaLanguageLibrary->formatNum(Language, array)
#9 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaCommon/LanguageLibrary.php(50): Scribunto_LuaLanguageLibrary->languageMethod(string, array)
#10 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxCallback.php(26): Scribunto_LuaLanguageLibrary->{closure}(string, double)
#11 [internal function]: Scribunto_LuaSandboxCallback->__call(string, array)
#12 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxInterpreter.php(113): LuaSandboxFunction->call(LuaSandboxFunction)
#13 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(291): Scribunto_LuaSandboxInterpreter->callFunction(LuaSandboxFunction, LuaSandboxFunction)
#14 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaCommon/LuaModule.php(68): Scribunto_LuaEngine->executeFunctionChunk(LuaSandboxFunction, PPTemplateFrame_Hash)
#15 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/common/Hooks.php(128): Scribunto_LuaModule->invoke(string, PPTemplateFrame_Hash)
#16 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(3347): ScribuntoHooks::invokeHook(Parser, PPTemplateFrame_Hash, array)
#17 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(3034): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#18 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#19 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPTemplateFrame_Hash.php(169): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#20 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPTemplateFrame_Hash.php(181): PPTemplateFrame_Hash->getNamedArgument(string)
#21 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(3841): PPTemplateFrame_Hash->getArgument(string)
#22 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPFrame_Hash.php(270): Parser->argSubstitution(array, PPTemplateFrame_Hash)
#23 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(2948): PPFrame_Hash->expand(PPNode_Hash_Tree)
#24 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#25 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPTemplateFrame_Hash.php(169): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#26 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPTemplateFrame_Hash.php(181): PPTemplateFrame_Hash->getNamedArgument(string)
#27 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(674): PPTemplateFrame_Hash->getArgument(string)
#28 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxCallback.php(26): Scribunto_LuaEngine->getExpandedArgument(string, string)
#29 [internal function]: Scribunto_LuaSandboxCallback->__call(string, array)
#30 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxInterpreter.php(113): LuaSandboxFunction->call(LuaSandboxFunction)
#31 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(291): Scribunto_LuaSandboxInterpreter->callFunction(LuaSandboxFunction, LuaSandboxFunction)
#32 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/engines/LuaCommon/LuaModule.php(68): Scribunto_LuaEngine->executeFunctionChunk(LuaSandboxFunction, PPTemplateFrame_Hash)
#33 /srv/mediawiki/php-1.36.0-wmf.16/extensions/Scribunto/includes/common/Hooks.php(128): Scribunto_LuaModule->invoke(string, PPTemplateFrame_Hash)
#34 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(3347): ScribuntoHooks::invokeHook(Parser, PPTemplateFrame_Hash, array)
#35 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(3034): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#36 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#37 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(3223): PPFrame_Hash->expand(PPNode_Hash_Tree)
#38 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#39 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(3223): PPFrame_Hash->expand(PPNode_Hash_Tree)
#40 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#41 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPTemplateFrame_Hash.php(89): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#42 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(3220): PPTemplateFrame_Hash->cachedExpand(string, PPNode_Hash_Tree)
#43 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/PPFrame_Hash.php(253): Parser->braceSubstitution(array, PPFrame_Hash)
#44 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(2872): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#45 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(1545): Parser->replaceVariables(string)
#46 /srv/mediawiki/php-1.36.0-wmf.16/includes/parser/Parser.php(646): Parser->internalParse(string)
#47 /srv/mediawiki/php-1.36.0-wmf.16/includes/content/WikitextContent.php(375): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#48 /srv/mediawiki/php-1.36.0-wmf.16/includes/content/AbstractContent.php(590): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#49 /srv/mediawiki/php-1.36.0-wmf.16/includes/Revision/RenderedRevision.php(266): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#50 /srv/mediawiki/php-1.36.0-wmf.16/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#51 /srv/mediawiki/php-1.36.0-wmf.16/includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#52 /srv/mediawiki/php-1.36.0-wmf.16/includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#53 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#54 /srv/mediawiki/php-1.36.0-wmf.16/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#55 /srv/mediawiki/php-1.36.0-wmf.16/includes/poolcounter/PoolWorkArticleView.php(215): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#56 /srv/mediawiki/php-1.36.0-wmf.16/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()
#57 /srv/mediawiki/php-1.36.0-wmf.16/includes/page/Article.php(811): PoolCounterWork->execute()
#58 /srv/mediawiki/php-1.36.0-wmf.16/includes/actions/ViewAction.php(74): Article->view()
#59 /srv/mediawiki/php-1.36.0-wmf.16/includes/MediaWiki.php(530): ViewAction->show()
#60 /srv/mediawiki/php-1.36.0-wmf.16/includes/MediaWiki.php(316): MediaWiki->performAction(Article, Title)
#61 /srv/mediawiki/php-1.36.0-wmf.16/includes/MediaWiki.php(943): MediaWiki->performRequest()
#62 /srv/mediawiki/php-1.36.0-wmf.16/includes/MediaWiki.php(546): MediaWiki->main()
#63 /srv/mediawiki/php-1.36.0-wmf.16/index.php(53): MediaWiki->run()
#64 /srv/mediawiki/php-1.36.0-wmf.16/index.php(46): wfIndexMain()
#65 /srv/mediawiki/w/index.php(3): require(string)
#66 {main}

Event Timeline

brennen created this task.Nov 9 2020, 6:53 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 9 2020, 6:53 PM

Change 640249 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/core@master] Downgrade the severity of the non-numeric argument to formatNum warnings

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

Change 640254 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[operations/mediawiki-config@master] Turn on formatnum logging

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

Change 640488 had a related patch set uploaded (by Brennen Bearnes; owner: C. Scott Ananian):
[mediawiki/core@wmf/1.36.0-wmf.16] Downgrade the severity of the non-numeric argument to formatNum warnings

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

Change 640249 merged by jenkins-bot:
[mediawiki/core@master] Downgrade the severity of the non-numeric argument to formatNum warnings

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

Change 640488 merged by jenkins-bot:
[mediawiki/core@wmf/1.36.0-wmf.16] Downgrade the severity of the non-numeric argument to formatNum warnings

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

Change 640254 merged by jenkins-bot:
[operations/mediawiki-config@master] Turn on formatnum logging

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

Mentioned in SAL (#wikimedia-operations) [2020-11-10T20:10:41Z] <brennen@deploy1001> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:640254|Turn on formatnum logging (T267587, T267370)]] (duration: 01m 02s)

Mentioned in SAL (#wikimedia-operations) [2020-11-10T20:27:25Z] <brennen@deploy1001> Started scap: Backport: [[gerrit:640487|language: Honor $wgTranslateNumerals, even if PHP does digit translation(T267614)]] and [[gerrit:640488|Downgrade the severity of the non-numeric argument to formatNum warnings (T267370, T267587)]]

Mentioned in SAL (#wikimedia-operations) [2020-11-10T21:02:06Z] <brennen@deploy1001> Finished scap: Backport: [[gerrit:640487|language: Honor $wgTranslateNumerals, even if PHP does digit translation(T267614)]] and [[gerrit:640488|Downgrade the severity of the non-numeric argument to formatNum warnings (T267370, T267587)]] (duration: 34m 46s)

Change 640246 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/extensions/Scribunto@master] library: Lua formatNum should check that the value is not infinity or NaN

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

Change 640263 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/core@master] languages: Language::formatNum() should accept any valid number

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

cscott renamed this task from Language: Use of Language::formatNum with a non-numeric string was deprecated in MediaWiki 1.36. to Language: Use of Language::formatNum with a non-numeric string was deprecated in MediaWiki 1.36 (Scribunto formatNum).Nov 10 2020, 9:58 PM
cscott updated the task description. (Show Details)
cscott added a subscriber: ssastry.

Change 640246 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@master] library: Lua formatNum should check that the value is not infinity or NaN

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

xd0bx renamed this task from Language: Use of Language::formatNum with a non-numeric string was deprecated in MediaWiki 1.36 (Scribunto formatNum) to Language: Use of Language::formatNum with a non-numeric string was deprecated in MediaWiki (Language :: formatNum).Mon, Jan 11, 8:51 PM
xd0bx set the point value for this task to 5.
xd0bx set Final Story Points to 4.
Aklapper renamed this task from Language: Use of Language::formatNum with a non-numeric string was deprecated in MediaWiki (Language :: formatNum) to Language: Use of Language::formatNum with a non-numeric string was deprecated in MediaWiki 1.36 (Scribunto formatNum).Tue, Jan 12, 7:55 AM
Aklapper removed 01tonythomas as the assignee of this task.
Aklapper removed the point value for this task.
Aklapper removed Final Story Points.
Aklapper added a subscriber: 01tonythomas.
Aklapper removed a subscriber: 01tonythomas.