diff --git a/module/product/model.php b/module/product/model.php index 10a3c47d53..09ca34936b 100755 --- a/module/product/model.php +++ b/module/product/model.php @@ -2039,7 +2039,7 @@ class productModel extends model { $updateTime = zget($this->app->config->global, 'productStatsTime', ''); $now = helper::now(); - if(time() - strtotime($updateTime) < $this->config->product->refreshInterval && !$refreshAll) return; + if($updateTime && time() - strtotime($updateTime) < $this->config->product->refreshInterval && !$refreshAll) return; /* * If productStatsTime is before two weeks ago, refresh all products directly. diff --git a/module/program/model.php b/module/program/model.php index 439e55ca63..c319aa45cc 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -1323,7 +1323,7 @@ class programModel extends model { $updateTime = zget($this->app->config->global, 'projectStatsTime', ''); $now = helper::now(); - if(time() - strtotime($updateTime) < $this->config->program->refreshInterval && !$refreshAll) return; + if($updateTime && time() - strtotime($updateTime) < $this->config->program->refreshInterval && !$refreshAll) return; /* * If projectStatsTime is before two weeks ago, refresh all executions directly.