diff --git a/tpl/part/vote_table.tpl b/tpl/part/vote_table.tpl index b9f9186..75408dd 100644 --- a/tpl/part/vote_table.tpl +++ b/tpl/part/vote_table.tpl @@ -1,3 +1,7 @@ +{if !is_array($best_moments) || empty($best_moments)} + {$best_moments = [0]} +{/if} +

{_('Votes of the poll')}

@@ -142,18 +146,20 @@ {* Line displaying best moments *} {$count_bests = 0} - - {_("Addition")} - {$max = max($best_moments)} - {foreach $best_moments as $best_moment} - {if $max == $best_moment} - {$count_bests = $count_bests +1} - {$max} - {else} - - {/if} - {/foreach} - + {$max = max($best_moments)} + {if $max > 0} + + {_("Addition")} + {foreach $best_moments as $best_moment} + {if $max == $best_moment} + {$count_bests = $count_bests +1} + {$max} + {else} + + {/if} + {/foreach} + + {/if}