diff options
author | Wolfgang Karall-Ahlborn <wolfgangkarall@users.noreply.github.com> | 2021-03-17 14:05:04 +0300 |
---|---|---|
committer | Wolfgang Karall-Ahlborn <wolfgangkarall@users.noreply.github.com> | 2021-03-17 14:05:04 +0300 |
commit | a2945aadc612383554f374721bef508965de0efb (patch) | |
tree | ae3ff1b67059581a8d6a2f899f2abdeb6caf6ae4 | |
parent | 6a833656b04f1bbb825d006109f049d3e8f3da9c (diff) |
Use defined() nonetheless, as there's still a possibility of undef.
-rwxr-xr-x | dmarcts-report-parser.pl | 4 |
1 files 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'; }; |