From 4812b7e07c8810c158bad1f99eb43cbd30c33ca3 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 30 Apr 2017 10:44:53 +0100 Subject: mod_storage_sql: Fix logic error introduced by variable rename in aa9f198cb3c9 (thanks waqas) --- plugins/mod_storage_sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_storage_sql.lua') diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index aab43d1f..d4a5f871 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -33,7 +33,7 @@ local function serialize(value) return "xml", tostring(value); elseif t == "table" then local encoded,err = json.encode(value); - if value then return "json", encoded; end + if encoded then return "json", encoded; end return nil, err; end return nil, "Unhandled value type: "..t; -- cgit v1.2.3