[FIX] Division by 0
This commit is contained in:
parent
5edf88b2ee
commit
61d52657f1
@ -46,6 +46,11 @@ if ($iTotalRoundShares > 0) {
|
||||
// Round progress
|
||||
$iEstShares = $statistics->getEstimatedShares($dDifficulty);
|
||||
$dEstPercent = round(100 / $iEstShares * $aRoundShares['valid'], 2);
|
||||
if ($iEstShares > 0 && $aRoundShares['valid'] > 0) {
|
||||
$dEstPercent = round(100 / $iEstShares * $aRoundShares['valid'], 2);
|
||||
} else {
|
||||
$dEstPercent = 0;
|
||||
}
|
||||
|
||||
// Output JSON format
|
||||
$data = array(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user