mod_storage_sql: Fix logic error introduced by variable rename in aa9f198cb3c9 (thanks waqas)
authorMatthew Wild <mwild1@gmail.com>
Sun, 30 Apr 2017 10:44:53 +0100
changeset 8141 cb605fb60e32
parent 8140 484ea6201c6c
child 8142 4119cca64064
mod_storage_sql: Fix logic error introduced by variable rename in aa9f198cb3c9 (thanks waqas)
plugins/mod_storage_sql.lua
--- a/plugins/mod_storage_sql.lua	Thu Apr 27 12:41:53 2017 +0200
+++ b/plugins/mod_storage_sql.lua	Sun Apr 30 10:44:53 2017 +0100
@@ -33,7 +33,7 @@
 		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;