]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Avoid comparing string with boolean 2855/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 17 Apr 2019 07:43:22 +0000 (10:43 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 17 Apr 2019 07:43:22 +0000 (10:43 +0300)
when CT is not found

src/plugins/lua/mime_types.lua

index e621b566668f47ef52de62dcee5bd8e7538cfec9..04655beb033bf5caf06e000613f6d385b0215744 100644 (file)
@@ -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