From 0ca52545bc71caa5c805d6e4864d442442ad07a2 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 19 Feb 2016 19:22:18 +0100 Subject: mod_storage_sql: Fix setting value to false in map store --- plugins/mod_storage_sql.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/mod_storage_sql.lua') diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index 34fcacee..6efa676c 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -148,7 +148,8 @@ function map_store:get(username, key) return result; end function map_store:set(username, key, data) - return self:set_keys(username, { [key] = data or self.remove }); + if data == nil then data = self.remove; end + return self:set_keys(username, { [key] = data }); end function map_store:set_keys(username, keydatas) local ok, result = engine:transaction(function() -- cgit v1.2.3