From a785d251e0707f2c5761b590767bec613294436a Mon Sep 17 00:00:00 2001 From: Frederick Behrends Date: Mon, 23 Dec 2013 09:58:47 +0100 Subject: [PATCH] [FIX] fixed division by Zero for Coins without valid Network Hashrate --- public/include/classes/statistics.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/include/classes/statistics.class.php b/public/include/classes/statistics.class.php index e832c742..d3d754cd 100644 --- a/public/include/classes/statistics.class.php +++ b/public/include/classes/statistics.class.php @@ -815,6 +815,9 @@ class Statistics extends Base { $dNetworkHashrate = 1; $dDifficulty = 1; } + if($dNetworkHashrate <= 0){ + return $this->memcache->setCache(__FUNCTION__, $this->config['cointarget']); + } return $this->memcache->setCache(__FUNCTION__, pow(2, 32) * $dDifficulty / $dNetworkHashrate); }