summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-08-14 08:10:40 +0200
committerByron Jones <glob@mozilla.com>2014-08-14 08:10:40 +0200
commitee4df197cd7c53a553370b520f9be6d0adc08205 (patch)
tree95874428286e5dcd496684ce3c552059084e6749 /Bugzilla/WebService
parent8cb02d65aa87806f8ed5e17347cbd355334ec295 (diff)
downloadbugzilla-ee4df197cd7c53a553370b520f9be6d0adc08205.tar.gz
bugzilla-ee4df197cd7c53a553370b520f9be6d0adc08205.tar.xz
Bug 1048712: comment tagging suggestions always returns a single result
r=sgreen,a=glob
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r--Bugzilla/WebService/Bug.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index 334be1057..e5a4a7397 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -1146,7 +1146,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 => {