From: Simon Green Date: Fri, 8 Jun 2012 07:03:13 +0000 (+0800) Subject: Bug 760075: Fix error thrown when an allwords search starts with or ends with a space X-Git-Tag: bugzilla-4.3.2~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0bd7772190fa654c7c65e1df98b60fa96c4d15d;p=thirdparty%2Fbugzilla.git Bug 760075: Fix error thrown when an allwords search starts with or ends with a space r=glob, a=LpSolit --- diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 9024afb289..3d9392769d 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -2515,6 +2515,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)); @@ -2682,15 +2683,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); }