From 90713bc2165496a5299f9fda1549bb9e91a6fecb Mon Sep 17 00:00:00 2001
From: "gerv%gerv.net" <>
Date: Sat, 23 Mar 2002 21:47:31 +0000
Subject: 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.
---
reports.cgi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'reports.cgi')
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 = "" . $cdata[int(rand($#cdata + 1))] . "";
+ if(@cdata) {
+ $quip = "" . $cdata[int(rand(scalar(@cdata)))] . "";
+ }
}
}
--
cgit v1.2.3-24-g4f1b