From a2945aadc612383554f374721bef508965de0efb Mon Sep 17 00:00:00 2001 From: Wolfgang Karall-Ahlborn Date: Wed, 17 Mar 2021 12:05:04 +0100 Subject: Use defined() nonetheless, as there's still a possibility of undef. --- dmarcts-report-parser.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dmarcts-report-parser.pl b/dmarcts-report-parser.pl index 756476a..e140ce4 100755 --- a/dmarcts-report-parser.pl +++ b/dmarcts-report-parser.pl @@ -920,7 +920,7 @@ sub storeXMLInDatabase { } } } - if ( ! grep { $_ eq $dkimresult } ALLOWED_DKIMRESULT ) { + if ( ! defined($dkimresult) || ! grep { $_ eq $dkimresult } ALLOWED_DKIMRESULT ) { $dkimresult = 'unknown'; }; @@ -953,7 +953,7 @@ sub storeXMLInDatabase { } } } - if ( ! grep { $_ eq $spfresult } ALLOWED_SPFRESULT ) { + if ( ! defined($spfresult) || ! grep { $_ eq $spfresult } ALLOWED_SPFRESULT ) { $spfresult = 'unknown'; }; -- cgit v1.2.3