From: Vsevolod Stakhov Date: Sat, 27 Feb 2021 23:05:35 +0000 (+0000) Subject: [Minor] Fix empty table check X-Git-Tag: 3.0~633 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08bf11078d67665968283b1b83bd2cf8de51f7b7;p=thirdparty%2Frspamd.git [Minor] Fix empty table check --- diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua index 5b1c857e9d..d94335f5b7 100644 --- a/lualib/lua_mime.lua +++ b/lualib/lua_mime.lua @@ -535,6 +535,9 @@ exports.modify_headers = function(task, hdr_alterations) if not hdr_flattened[hname] then hdr_flattened[hname] = {remove = {}} end + if not hdr_flattened[hname].remove then + hdr_flattened[hname].remove = {} + end local remove_tbl = hdr_flattened[hname].remove if type(hdr) == 'number' then table.insert(remove_tbl, hdr)