# HG changeset patch # User Matthew Wild # Date 1493545493 -3600 # Node ID cb605fb60e32c0ede692fc6961ad0555160c99c7 # Parent 484ea6201c6c28793c6d1a94fea5264811e12889 mod_storage_sql: Fix logic error introduced by variable rename in aa9f198cb3c9 (thanks waqas) diff -r 484ea6201c6c -r cb605fb60e32 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;