From: gerv%gerv.net <>
Date: Sat, 23 Mar 2002 21:47:31 +0000 (+0000)
Subject: Bug 132634 - remove warning in reports.cgi when quips aren't used. Patch by cedric...
X-Git-Tag: bugzilla-2.16rc1~174
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90713bc2165496a5299f9fda1549bb9e91a6fecb;p=thirdparty%2Fbugzilla.git
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.
---
diff --git a/reports.cgi b/reports.cgi
index 7e97861fb7..6a80a71156 100755
--- a/reports.cgi
+++ b/reports.cgi
@@ -334,7 +334,9 @@ FIN
push @cdata, $_;
}
close COMMENTS;
- $quip = "" . $cdata[int(rand($#cdata + 1))] . "";
+ if(@cdata) {
+ $quip = "" . $cdata[int(rand(scalar(@cdata)))] . "";
+ }
}
}