Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefan@piwik.org>2014-03-10 00:47:38 +0400
committersgiehl <stefan@piwik.org>2014-03-10 00:47:38 +0400
commite3313951b25b44c0ac6582fa33d6da0d0ddbe1ba (patch)
tree66398c39236836cb5ad974ecfd61ba409554be36 /plugins/Insights/InsightReport.php
parent8c4efab2eb13af59903275cb79734e9de3c22e5f (diff)
prevent division by zero for 0 value
Diffstat (limited to 'plugins/Insights/InsightReport.php')
-rw-r--r--plugins/Insights/InsightReport.php2
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);