From 9961bec6d71d3aa0dd81909b75760541dae72b40 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" Date: Sat, 23 Mar 2002 13:47:31 +0000 Subject: [PATCH] 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. git-svn-id: svn://10.0.0.236/trunk@117306 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/reports.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mozilla/webtools/bugzilla/reports.cgi b/mozilla/webtools/bugzilla/reports.cgi index 7e97861fb7d..6a80a71156d 100755 --- a/mozilla/webtools/bugzilla/reports.cgi +++ b/mozilla/webtools/bugzilla/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)))] . ""; + } } }