diff --git a/core/ViewDataTable.php b/core/ViewDataTable.php index a75b2354d59f9439fe18fec1d663f513a81fc7c6..8d347ec3abd1e1b5072bf1e6ce6602eb6ea64901 100644 --- a/core/ViewDataTable.php +++ b/core/ViewDataTable.php @@ -389,7 +389,7 @@ class ViewDataTable { if (self::$reportPropertiesCache === null) { self::$reportPropertiesCache = array(); - Piwik_PostEvent('ViewDataTable.getReportDisplayProperties', array(&self::$reportPropertiesCache)); + Piwik_PostEvent('ViewDataTable.getReportDisplayProperties', array(self::$reportPropertiesCache)); } return self::$reportPropertiesCache; @@ -952,8 +952,8 @@ class ViewDataTable if ($strPeriod !== false && $strDate !== false - && (is_null($this->dataTable) || $this->dataTable->getRowsCount() == 0) - ) { + && (is_null($this->dataTable) + || (!empty($this->dataTable) && $this->dataTable->getRowsCount() == 0))) { // if range, only look at the first date if ($strPeriod == 'range') { $idSite = Common::getRequestVar('idSite', '');