summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-02-13 06:48:05 +0100
committerByron Jones <glob@mozilla.com>2015-02-13 06:48:05 +0100
commitf3cf75b812c481646bfa613956f01af1904742b9 (patch)
tree49a4ad2fba9acc3cc5055195a5648f7c60ba507f /Bugzilla/DB
parent8ec648e1e2ff410aa009fbd85ab31276f2b78da6 (diff)
downloadbugzilla-f3cf75b812c481646bfa613956f01af1904742b9.tar.gz
bugzilla-f3cf75b812c481646bfa613956f01af1904742b9.tar.xz
Bug 1124810: Searching for '---' in Simple Search causes a SQL error
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Mysql.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index c430725ef..d642b5825 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -187,6 +187,10 @@ sub sql_fulltext_search {
if ($word =~ /\w\W+\w/ && $word !~ m/"/) {
$word = '"' . $word . '"';
}
+ # match words that contain only boolean operators
+ elsif ($word =~ /^[\+\-\<\>\~\*]+$/) {
+ $word = '"' . $word . '"';
+ }
}
$text = join('', @words);
}