]> git.donarmstrong.com Git - debbugs.git/commitdiff
if there is not a msgid, it cannot be spam
authorDon Armstrong <don@donarmstrong.com>
Sat, 1 Jul 2017 23:46:08 +0000 (16:46 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sat, 1 Jul 2017 23:46:08 +0000 (16:46 -0700)
Debbugs/Log/Spam.pm

index 3b14b39cfafed904231eab82d224f27a3c063bc6..cca94dea7cc7070ac3d0b9031eb99b3f3cd74e8d 100644 (file)
@@ -158,6 +158,7 @@ Returns 0 if this message is not spam
 =cut
 sub is_spam {
     my ($self,$msgid) = @_;
+    return 0 if not defined $msgid or not length $msgid;
     $msgid =~ s/^<|>$//;
     if (exists $self->{spam}{$msgid} and
         $self->{spam}{$msgid}