From 09d11313d8893a61e44b22acf2370d345cd643e2 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 14 Aug 2014 14:10:37 +0800 Subject: Bug 1048712: comment tagging suggestions always returns a single result --- Bugzilla/WebService/Bug.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 405f04b0f..f3e075fd2 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -1229,7 +1229,11 @@ sub search_comment_tags { my $query = $params->{query}; $query // ThrowCodeError('param_required', { param => 'query' }); - my $limit = detaint_natural($params->{limit}) || 7; + my $limit = $params->{limit} || 7; + detaint_natural($limit) + || ThrowCodeError('param_must_be_numeric', { param => 'limit', + function => 'Bug.search_comment_tags' }); + my $tags = Bugzilla::Comment::TagWeights->match({ WHERE => { -- cgit v1.2.3-24-g4f1b