diff options
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r-- | modules/poll/poll.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module index bdf7a2ea1..79a1a9704 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -293,7 +293,7 @@ function poll_view_results(&$node, $main, $block, $links) { if ($node->choice) { foreach ($node->choice as $key => $value) { if ($value != "") { - $width = round($node->chvotes[$key] * 100 / $votestotal); + $width = round($node->chvotes[$key] * 100 / max($votestotal, 1)); $percentage = round($node->chvotes[$key] * 100 / max($votestotal, 1)); $output .= "<div class=\"text\">". filter($value) ."</div>"; $output .= "<div class=\"bar\">"; |