diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-04-27 23:21:43 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-04-27 23:21:43 +0300 |
commit | d5545daa777532276b9b08e489824dc44f3e4c1e (patch) | |
tree | f40c60be2218dcfc8f4605eb71a899bafc98d29b | |
parent | 0ec0503e6f59bf5daa5637cf7d4abad44aa2bdd6 (diff) |
fix possible fatal if pastData was not fetched
-rw-r--r-- | plugins/MultiSites/Dashboard.php | 10 |
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']); + } } } |