diff options
author | sgiehl <stefan@piwik.org> | 2014-03-10 00:47:38 +0400 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2014-03-10 00:47:38 +0400 |
commit | e3313951b25b44c0ac6582fa33d6da0d0ddbe1ba (patch) | |
tree | 66398c39236836cb5ad974ecfd61ba409554be36 /plugins/Insights/InsightReport.php | |
parent | 8c4efab2eb13af59903275cb79734e9de3c22e5f (diff) |
prevent division by zero for 0 value
Diffstat (limited to 'plugins/Insights/InsightReport.php')
-rw-r--r-- | plugins/Insights/InsightReport.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/Insights/InsightReport.php b/plugins/Insights/InsightReport.php index 759f7bf5a8..7c62df9344 100644 --- a/plugins/Insights/InsightReport.php +++ b/plugins/Insights/InsightReport.php @@ -64,7 +64,7 @@ class InsightReport $minNewPercent = 5; } - if ($totalValue < 200) { + if ($totalValue < 200 && $totalValue > 0) { // force at least a change of 2 visits $minMoversPercent = (int) ceil(2 / ($totalValue / 100)); $minNewPercent = max($minNewPercent, $minMoversPercent); |