From 8837967f9754641c7cf4a9bf2a5bc6e73244df15 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 30 Apr 2012 14:43:29 +0800 Subject: Bug 749074: Throw an error message instead of syntax error on invalid search type operators r=LpSolit,a=LpSolit --- Bugzilla/Search.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Search.pm') 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); } -- cgit v1.2.3-24-g4f1b