From: Vsevolod Stakhov Date: Thu, 20 Sep 2018 09:51:33 +0000 (+0100) Subject: [Minor] Fix implicit conversion X-Git-Tag: 1.8.0~56 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d82bb62834c158a2108ceb412745b046b2990b9f;p=rspamd.git [Minor] Fix implicit conversion --- diff --git a/lualib/lua_selectors.lua b/lualib/lua_selectors.lua index 983f28589..ad18feddf 100644 --- a/lualib/lua_selectors.lua +++ b/lualib/lua_selectors.lua @@ -569,9 +569,7 @@ local function process_selector(task, sel) end local function implicit_tostring(t, ud_or_table) - if t == 'userdata' then - return tostring(ud_or_table),'string' - else + if t == 'table' then -- Table (very special) if ud_or_table.value then return ud_or_table.value,'string' @@ -580,6 +578,8 @@ local function process_selector(task, sel) end return logger.slog("%s", ud_or_table),'string' + else + return tostring(ud_or_table),'string' end end