]> git.donarmstrong.com Git - debbugs.git/commitdiff
skip fields which are not needed to be matched
authorDon Armstrong <don@donarmstrong.com>
Tue, 21 Jul 2009 17:58:57 +0000 (19:58 +0200)
committerDon Armstrong <don@donarmstrong.com>
Tue, 21 Jul 2009 17:58:57 +0000 (19:58 +0200)
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;