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:
authorThomas Steur <thomas.steur@gmail.com>2015-04-27 23:21:43 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-04-27 23:21:43 +0300
commitd5545daa777532276b9b08e489824dc44f3e4c1e (patch)
treef40c60be2218dcfc8f4605eb71a899bafc98d29b
parent0ec0503e6f59bf5daa5637cf7d4abad44aa2bdd6 (diff)
fix possible fatal if pastData was not fetched
-rw-r--r--plugins/MultiSites/Dashboard.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/MultiSites/Dashboard.php b/plugins/MultiSites/Dashboard.php
index 015592b1bd..ea230df705 100644
--- a/plugins/MultiSites/Dashboard.php
+++ b/plugins/MultiSites/Dashboard.php
@@ -56,10 +56,12 @@ class Dashboard
$row->setColumn('label', $site['name']);
$row->setMetadata('group', $site['group']);
- // if we do not update the pastData labels, the evolution cannot be calculated correctly.
- $pastRow = $pastData->getRowFromLabel($idSite);
- if ($pastRow) {
- $pastRow->setColumn('label', $site['name']);
+ if ($pastData) {
+ // if we do not update the pastData labels, the evolution cannot be calculated correctly.
+ $pastRow = $pastData->getRowFromLabel($idSite);
+ if ($pastRow) {
+ $pastRow->setColumn('label', $site['name']);
+ }
}
}