From 59460995ee7a5634fdd27765b75e79053eb43c1a Mon Sep 17 00:00:00 2001 From: Sunil Joshi Date: Wed, 2 Jan 2013 00:22:58 +0100 Subject: Bug 401918: describekeywords.cgi with no keywords simply displays an empty page instead of throwing an error r/a=LpSolit --- describekeywords.cgi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'describekeywords.cgi') 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(); -- cgit v1.2.3-24-g4f1b