[FIX] Division by 0
This commit is contained in:
parent
cdf0999178
commit
5edf88b2ee
@ -81,7 +81,11 @@ $aPrice = $setting->getValue('price');
|
|||||||
|
|
||||||
// Round progress
|
// Round progress
|
||||||
$iEstShares = $statistics->getEstimatedShares($dDifficulty);
|
$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
|
// Output JSON format
|
||||||
$data = array(
|
$data = array(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user