From: Alexander Moisseev Date: Sat, 3 Dec 2016 18:20:43 +0000 (+0300) Subject: [Minor] Avoid nil index X-Git-Tag: 1.4.2~11^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5fc30a05fbd7eb93e2318e642fee942e874f60fc;p=rspamd.git [Minor] Avoid nil index --- diff --git a/rules/misc.lua b/rules/misc.lua index 20e4d3ddf..5eeda6af3 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -490,7 +490,7 @@ local check_from_id = rspamd_config:register_callback_symbol('CHECK_FROM', 1.0, then task:insert_result('FROM_EQ_ENVFROM', 1.0) elseif (envfrom and envfrom[1] and envfrom[1].addr) then - task:insert_result('FROM_NEQ_ENVFROM', 1.0, from[1].addr, envfrom[1].addr) + task:insert_result('FROM_NEQ_ENVFROM', 1.0, from and from[1].addr or '', envfrom[1].addr) end local to = task:get_recipients(2)