summaryrefslogtreecommitdiffstats
path: root/reports.cgi
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-03-23 22:47:31 +0100
committergerv%gerv.net <>2002-03-23 22:47:31 +0100
commit90713bc2165496a5299f9fda1549bb9e91a6fecb (patch)
tree7d5de0be82a9332ffedb1cd5d0bb7f8bf41f0337 /reports.cgi
parent962489b3dbfde71ac5c896794b42a3302d7e905f (diff)
downloadbugzilla-90713bc2165496a5299f9fda1549bb9e91a6fecb.tar.gz
bugzilla-90713bc2165496a5299f9fda1549bb9e91a6fecb.tar.xz
Bug 132634 - remove warning in reports.cgi when quips aren't used. Patch by cedric.caron@urbanet.ch; fixed up by xor@ivwnet.com; 2xr=gerv.
Diffstat (limited to 'reports.cgi')
-rwxr-xr-xreports.cgi4
1 files changed, 3 insertions, 1 deletions
diff --git a/reports.cgi b/reports.cgi
index 7e97861fb..6a80a7115 100755
--- a/reports.cgi
+++ b/reports.cgi
@@ -334,7 +334,9 @@ FIN
push @cdata, $_;
}
close COMMENTS;
- $quip = "<i>" . $cdata[int(rand($#cdata + 1))] . "</i>";
+ if(@cdata) {
+ $quip = "<i>" . $cdata[int(rand(scalar(@cdata)))] . "</i>";
+ }
}
}