Mercurial > prosody-hg
diff plugins/mod_storage_sql.lua @ 8138:cb605fb60e32
mod_storage_sql: Fix logic error introduced by variable rename in aa9f198cb3c9 (thanks waqas)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 30 Apr 2017 10:44:53 +0100 |
| parents | 8ca11201bfe7 |
| children | 5c91fb62338e 2fc8b83dd736 |
line wrap: on
line diff
--- 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;
