summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-04-30 08:43:29 +0200
committerByron Jones <bjones@mozilla.com>2012-04-30 08:43:29 +0200
commit8837967f9754641c7cf4a9bf2a5bc6e73244df15 (patch)
treeebe9cb0b745faefe38cae7aebcdedfa2b77c098e /Bugzilla/Search.pm
parentfb2f6bd8ca4ed8879f82a2764d63d51a06670477 (diff)
downloadbugzilla-8837967f9754641c7cf4a9bf2a5bc6e73244df15.tar.gz
bugzilla-8837967f9754641c7cf4a9bf2a5bc6e73244df15.tar.xz
Bug 749074: Throw an error message instead of syntax error on invalid search type operators
r=LpSolit,a=LpSolit
Diffstat (limited to 'Bugzilla/Search.pm')
-rw-r--r--Bugzilla/Search.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index e42952347..9024afb28 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -1779,7 +1779,9 @@ sub do_search_function {
sub _do_operator_function {
my ($self, $func_args) = @_;
my $operator = $func_args->{operator};
- my $operator_func = OPERATORS->{$operator};
+ my $operator_func = OPERATORS->{$operator}
+ || ThrowCodeError("search_field_operator_unsupported",
+ { operator => $operator });
$self->$operator_func($func_args);
}