# HG changeset patch # User Kim Alvefur # Date 1527946777 -7200 # Node ID 8e5da12205b59f441bf54573b41b0b955ea8dbec # Parent 1d0925d008b27e292059d11a48e11a92647ef7e8 mod_storage_memory: Fix removal of data in keyvalue (thanks jonasw) diff -r 1d0925d008b2 -r 8e5da12205b5 mod_storage_memory/mod_storage_memory.lua --- a/mod_storage_memory/mod_storage_memory.lua Sat Jun 02 03:13:13 2018 +0200 +++ b/mod_storage_memory/mod_storage_memory.lua Sat Jun 02 15:39:37 2018 +0200 @@ -29,7 +29,10 @@ end function keyval_store:set(username, data) - self.store[username or NULL] = envload("return "..serialize(data), "@data", {}); + if data ~= nil then + data = envload("return "..serialize(data), "@data", {}); + end + self.store[username or NULL] = data; return true; end