Commit 90713bc2 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 132634 - remove warning in reports.cgi when quips aren't used. Patch by…

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.
parent 962489b3
...@@ -334,7 +334,9 @@ FIN ...@@ -334,7 +334,9 @@ FIN
push @cdata, $_; push @cdata, $_;
} }
close COMMENTS; close COMMENTS;
$quip = "<i>" . $cdata[int(rand($#cdata + 1))] . "</i>"; if(@cdata) {
$quip = "<i>" . $cdata[int(rand(scalar(@cdata)))] . "</i>";
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment