aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_mime.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-02-27 23:05:35 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-02-27 23:05:35 +0000
commit08bf11078d67665968283b1b83bd2cf8de51f7b7 (patch)
treed6d6ab40638555922810d5a1969bcb15aa4372ef /lualib/lua_mime.lua
parent0a48dc5c4d572702616d783343b825d230301ac3 (diff)
downloadrspamd-08bf11078d67665968283b1b83bd2cf8de51f7b7.tar.gz
rspamd-08bf11078d67665968283b1b83bd2cf8de51f7b7.zip
[Minor] Fix empty table check
Diffstat (limited to 'lualib/lua_mime.lua')
-rw-r--r--lualib/lua_mime.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua
index 5b1c857e9..d94335f5b 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)