prevent divisons by zero for progress bars

This commit is contained in:
oliver 2015-04-19 16:09:45 +02:00
commit 6c5fbb3f22
5 changed files with 7 additions and 7 deletions

View file

@ -18,7 +18,7 @@
<div class="libindxpr cf">
<p><small>Themenfortschritt: <?=$questtopic['characterQuestcount']?> / <?=$questtopic['questcount']?></small></p>
<div class="xpbar">
<span style="width:<?=round($questtopic['characterQuestcount']/$questtopic['questcount']*100)?>%"></span>
<span style="width:<?=($questtopic['questcount'] > 0) ? round($questtopic['characterQuestcount']/$questtopic['questcount']*100) : 0?>%"></span>
</div>
</div>