summaryrefslogtreecommitdiffstats
path: root/describekeywords.cgi
diff options
context:
space:
mode:
authorSunil Joshi <joshi_sunil@in.com>2013-01-02 00:22:58 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2013-01-02 00:22:58 +0100
commit59460995ee7a5634fdd27765b75e79053eb43c1a (patch)
tree0ae4fafa9d24bd4e0473c49de189e9c338fe924c /describekeywords.cgi
parent91ad0813c473f7de1fc0aef3b17e7bc03fb67050 (diff)
downloadbugzilla-59460995ee7a5634fdd27765b75e79053eb43c1a.tar.gz
bugzilla-59460995ee7a5634fdd27765b75e79053eb43c1a.tar.xz
Bug 401918: describekeywords.cgi with no keywords simply displays an empty page instead of throwing an error
r/a=LpSolit
Diffstat (limited to 'describekeywords.cgi')
-rwxr-xr-xdescribekeywords.cgi3
1 files changed, 3 insertions, 0 deletions
diff --git a/describekeywords.cgi b/describekeywords.cgi
index ef0634960..4976fada1 100755
--- a/describekeywords.cgi
+++ b/describekeywords.cgi
@@ -24,6 +24,9 @@ my $vars = {};
Bugzilla->switch_to_shadow_db;
$vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count();
+if (!@{$vars->{keywords}}) {
+ ThrowUserError("no_keywords");
+}
$vars->{'caneditkeywords'} = $user->in_group("editkeywords");
print $cgi->header();