diff --git a/public/include/pages/api/getdashboarddata.inc.php b/public/include/pages/api/getdashboarddata.inc.php index c3877e75..c2e766f6 100644 --- a/public/include/pages/api/getdashboarddata.inc.php +++ b/public/include/pages/api/getdashboarddata.inc.php @@ -81,7 +81,11 @@ $aPrice = $setting->getValue('price'); // 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(