From: Vsevolod Stakhov Date: Fri, 9 Apr 2021 18:27:29 +0000 (+0100) Subject: [Minor] Avoid extra has_symbol call X-Git-Tag: 3.0~510 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd51e047a9ce33c730e0d810d10c02b4d54b9e06;p=thirdparty%2Frspamd.git [Minor] Avoid extra has_symbol call --- diff --git a/src/plugins/lua/phishing.lua b/src/plugins/lua/phishing.lua index ed6ffe3bd9..86b1d440b5 100644 --- a/src/plugins/lua/phishing.lua +++ b/src/plugins/lua/phishing.lua @@ -183,8 +183,9 @@ local function phishing_cb(task) -- Process all urls local dmarc_dom - if task:has_symbol('DMARC_POLICY_ALLOW') then - local dsym = task:get_symbol('DMARC_POLICY_ALLOW')[1] + local dsym = task:get_symbol('DMARC_POLICY_ALLOW') + if dsym then + dsym = dsym[1] -- legacy stuff, need to take the first element dmarc_dom = dsym.options[1] end