Commit 8837967f authored by Byron Jones's avatar Byron Jones

Bug 749074: Throw an error message instead of syntax error on invalid search type operators

r=LpSolit,a=LpSolit
parent fb2f6bd8
......@@ -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);
}
......
......@@ -453,6 +453,10 @@
[% ELSIF error == "invalid_post_bug_submit_action" %]
Invalid setting for post_bug_submit_action
[% ELSIF error == "search_field_operator_unsupported" %]
[% terms.Bugzilla %] does not support the search type
"[% operator FILTER html %]".
[% ELSE %]
[%# Try to find hooked error messages %]
[% error_message = Hook.process("errors") %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment