From: Alexander Moisseev Date: Wed, 17 Apr 2019 07:43:22 +0000 (+0300) Subject: [Minor] Avoid comparing string with boolean X-Git-Tag: 1.9.3~107^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F2855%2Fhead;p=rspamd.git [Minor] Avoid comparing string with boolean when CT is not found --- diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index e621b5666..04655beb0 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -1090,7 +1090,7 @@ local function check_mime_type(task) local detected_different = false if detected_ct and detected_ct ~= ct then local v_detected = map:get_key(detected_ct) - if v_detected > v then v = v_detected end + if not v or v_detected and v_detected > v then v = v_detected end detected_different = true end if v then