prosody: Call tostring on the key being used for nil global read before concatenating...
authorWaqas Hussain <waqas20@gmail.com>
Wed, 9 Dec 2009 21:50:23 +0000 (02:50 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Wed, 9 Dec 2009 21:50:23 +0000 (02:50 +0500)
prosody

diff --git a/prosody b/prosody
index 9ed1269c246cda843a4d016fbc24022b6d11a8cf..0a74051f4960c53b124a41b74fba4ddc1376969e 100755 (executable)
--- a/prosody
+++ b/prosody
@@ -296,7 +296,7 @@ end
 function init_global_protection()
        -- Catch global accesses
        local locked_globals_mt = {
-               __index = function (t, k) log("warn", "%s", debug.traceback("Attempt to read a non-existent global '"..k.."'", 2)); end;
+               __index = function (t, k) log("warn", "%s", debug.traceback("Attempt to read a non-existent global '"..tostring(k).."'", 2)); end;
                __newindex = function (t, k, v) error("Attempt to set a global: "..tostring(k).." = "..tostring(v), 2); end;
        };