Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/124346
Change subject: Stringify numbers in frame:callParserFunction
......................................................................
Stringify numbers in frame:callParserFunction
While PHP would normally stringify them anyway, some places in the code
specifically check for is_string.
Bug: 63597
Change-Id: Ie7ac34ae4bce70cec455d90c3f02a658644f6866
---
M engines/LuaCommon/lualib/mw.lua
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto
refs/changes/46/124346/1
diff --git a/engines/LuaCommon/lualib/mw.lua b/engines/LuaCommon/lualib/mw.lua
index 4bc3e4b..65d419e 100644
--- a/engines/LuaCommon/lualib/mw.lua
+++ b/engines/LuaCommon/lualib/mw.lua
@@ -436,7 +436,9 @@
if type( k ) ~= 'string' and type( k ) ~= 'number' then
error( "frame:callParserFunction: arg keys must
be strings or numbers", 2 )
end
- if type( v ) ~= 'string' and type( v ) ~= 'number' then
+ if type( v ) == 'number' then
+ args[k] = tostring( v )
+ elseif type( v ) ~= 'string' then
error( "frame:callParserFunction: args must be
strings or numbers", 2 )
end
end
--
To view, visit https://gerrit.wikimedia.org/r/124346
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7ac34ae4bce70cec455d90c3f02a658644f6866
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits