]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 760075: Fix error thrown when an allwords search starts with or ends with a space
authorSimon Green <sgreen+mozilla@redhat.com>
Fri, 8 Jun 2012 07:01:10 +0000 (15:01 +0800)
committerByron Jones <bjones@mozilla.com>
Fri, 8 Jun 2012 07:01:10 +0000 (15:01 +0800)
r=glob, a=LpSolit

Bugzilla/Search.pm

index ae33875d941fff8ed7a291713565c681f87ce3a0..9a7feee732d61ff178d9b73e2e5ea652284333cf 100644 (file)
@@ -2536,6 +2536,7 @@ sub _multiselect_multiple {
     
     my @terms;
     foreach my $word (@words) {
+        next if $word eq '';
         $args->{value} = $word;
         $args->{quoted} = $dbh->quote($word);
         push(@terms, $self->_multiselect_term($args));
@@ -2703,15 +2704,14 @@ sub _anyexact {
 
 sub _anywordsubstr {
     my ($self, $args) = @_;
-    my ($full_field, $value) = @$args{qw(full_field value)};
-    
+
     my @terms = $self->_substring_terms($args);
     $args->{term} = join("\n\tOR ", @terms);
 }
 
 sub _allwordssubstr {
     my ($self, $args) = @_;
-    
+
     my @terms = $self->_substring_terms($args);
     $args->{term} = join("\n\tAND ", @terms);
 }