Skip to content

Commit f3cf75b

Browse files
committed
Bug 1124810: Searching for '---' in Simple Search causes a SQL error
1 parent 8ec648e commit f3cf75b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Bugzilla/DB/Mysql.pm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ sub sql_fulltext_search {
187187
if ($word =~ /\w\W+\w/ && $word !~ m/"/) {
188188
$word = '"' . $word . '"';
189189
}
190+
# match words that contain only boolean operators
191+
elsif ($word =~ /^[\+\-\<\>\~\*]+$/) {
192+
$word = '"' . $word . '"';
193+
}
190194
}
191195
$text = join('', @words);
192196
}

0 commit comments

Comments
 (0)