summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-11-16 17:11:41 +0100
committerYorhel <git@yorhel.nl>2009-11-16 17:11:41 +0100
commit1bddfcb5862be5f40d1a4e5595aa22d79b67b9cd (patch)
tree2624ee068bbdb5ca87a20d782fb0b9df44f2d398 /lib
parent91cd52f0cc9357778a404b05b7694d9313c8ad55 (diff)
htmlVoteStats(): Fixed another undef in multiplication warning
I didn't expect c_popularity to be NULL when c_votecount > 0, but forgot that this is indeed possible when the votes don't count in the popularity ranking (because it's the only or lowest vote of the user).
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Util/CommonHTML.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm
index dc87d737..f39ffaaa 100644
--- a/lib/VNDB/Util/CommonHTML.pm
+++ b/lib/VNDB/Util/CommonHTML.pm
@@ -482,7 +482,7 @@ sub htmlVoteStats {
if($type eq 'v' && $obj->{c_votecount}) {
div;
h3 mt '_votestats_rank_title';
- p mt '_votestats_rank_pop', $obj->{p_ranking}, sprintf '%.2f', $obj->{c_popularity}*100;
+ p mt '_votestats_rank_pop', $obj->{p_ranking}, sprintf '%.2f', ($obj->{c_popularity}||0)*100;
p mt '_votestats_rank_rat', $obj->{r_ranking}, sprintf '%.2f', $obj->{c_rating};
end;
}