diff options
author | Simon Green <sgreen+mozilla@redhat.com> | 2012-06-08 09:01:10 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2012-06-08 09:01:10 +0200 |
commit | 5aa5bbfb163700a04202093000d839c9579658a4 (patch) | |
tree | 39dcb0bc802b4900a02489fbbeb8d76c477e65f6 | |
parent | 426c922480a37f09abef331f01a22bc4747bc880 (diff) | |
download | bugzilla-5aa5bbfb163700a04202093000d839c9579658a4.tar.gz bugzilla-5aa5bbfb163700a04202093000d839c9579658a4.tar.xz |
Bug 760075: Fix error thrown when an allwords search starts with or ends with a space
r=glob, a=LpSolit
-rw-r--r-- | Bugzilla/Search.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index ae33875d9..9a7feee73 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -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); } |