[FIX] Catch edgecase PHP warning

This commit is contained in:
Sebastian Grewe 2016-07-07 11:58:14 +02:00
parent 33f402ad80
commit 14c77ea7db
2 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@
<td class="text-right">{$BLOCKSFOUND[block].estshares|number_format}</td>
<td class="text-right">{$BLOCKSFOUND[block].shares|number_format}</td>
<td class="text-right">
{math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares|default:"0" estshares=$BLOCKSFOUND[block].estshares}
{if estshares > 0 }{math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares|default:"0" estshares=$BLOCKSFOUND[block].estshares}{else}{assign var=percentage value="0"}{/if}
<font color="{if ($percentage <= 100)}green{else}red{/if}">{$percentage|number_format:"2"}</font>
</td>
</tr>
@ -51,4 +51,4 @@
</div>
{/if}
</div>
{/if}
{/if}

View File

@ -29,7 +29,7 @@
<td class="text-right">{$BLOCKSFOUND[block].estshares|number_format}</td>
<td class="text-right">{$BLOCKSFOUND[block].shares|number_format}</td>
<td class="text-right">
{math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares|default:"0" estshares=$BLOCKSFOUND[block].estshares}
{if estshares > 0 }{math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares|default:"0" estshares=$BLOCKSFOUND[block].estshares}{else}{assign var=percentage value="0"}{/if}
<font color="{if ($percentage <= 100)}green{else}red{/if}">{$percentage|number_format:"2"}</font>
</td>
</tr>
@ -46,4 +46,4 @@
{/if}
</div>
</div>
{/if}
{/if}