]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Bugs.pm
skip fields which are not needed to be matched
[debbugs.git] / Debbugs / Bugs.pm
index a68235827bdd78c0fb7002a3fcd11c2608a185f8..eff1593640e87c2c6f41ae5d9eb70b1d55bed7e1 100644 (file)
@@ -777,7 +777,11 @@ sub __bug_matches {
     my ($hash, $status) = @_;
     foreach my $key( keys( %$hash ) ) {
         my $value = $hash->{$key};
+       next unless exists $field_match{$key};
        my $sub = $field_match{$key};
+       if (not defined $sub) {
+           die "No defined subroutine for key: $key";
+       }
        return 1 if ($sub->($key, $value, $status));
     }
     return 0;