aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-08-14 14:10:40 +0800
committerByron Jones <glob@mozilla.com>2014-08-14 14:10:40 +0800
commitee4df197cd7c53a553370b520f9be6d0adc08205 (patch)
tree95874428286e5dcd496684ce3c552059084e6749
parent8cb02d65aa87806f8ed5e17347cbd355334ec295 (diff)
downloadbugs-ee4df197cd7c53a553370b520f9be6d0adc08205.tar
bugs-ee4df197cd7c53a553370b520f9be6d0adc08205.tar.gz
bugs-ee4df197cd7c53a553370b520f9be6d0adc08205.tar.bz2
bugs-ee4df197cd7c53a553370b520f9be6d0adc08205.tar.xz
bugs-ee4df197cd7c53a553370b520f9be6d0adc08205.zip
Bug 1048712: comment tagging suggestions always returns a single result
r=sgreen,a=glob
-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 => {