X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fcore%2Fluasrc%2Futil.lua;fp=libs%2Fcore%2Fluasrc%2Futil.lua;h=84c63f240409091588a09821e970f2a4df70c7ea;hp=9747a448620abd478185f9d9ebe5312823a453d2;hb=26d792d914fdf78a3f0d2bbc46d6927375e27e93;hpb=ae4694243d9e5502382bd5f1b3e8ac3397c47f21 diff --git a/libs/core/luasrc/util.lua b/libs/core/luasrc/util.lua index 9747a4486..84c63f240 100644 --- a/libs/core/luasrc/util.lua +++ b/libs/core/luasrc/util.lua @@ -49,8 +49,10 @@ getmetatable("").__mod = function(a, b) if not b then return a elseif type(b) == "table" then + for k, _ in pairs(b) do if type(b[k]) == "userdata" then b[k] = tostring(b[k]) end end return a:format(unpack(b)) else + if type(b) == "userdata" then b = tostring(b) end return a:format(b) end end