diff options
-rw-r--r-- | core/Plugin/Report.php | 2 | ||||
-rw-r--r-- | plugins/API/Reports/Get.php | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php index af61a33a0a..5f959864cb 100644 --- a/core/Plugin/Report.php +++ b/core/Plugin/Report.php @@ -405,7 +405,7 @@ class Report * default metric translation for this metric using the {@hook Metrics.getDefaultMetricTranslations} event. If you * want to overwrite any default metric translation you should overwrite this method, call this parent method to * get all default translations and overwrite any custom metric translations. - * @return array + * @return array|mixed * @api */ public function getProcessedMetrics() diff --git a/plugins/API/Reports/Get.php b/plugins/API/Reports/Get.php index 11a4df5d6a..de087d0a86 100644 --- a/plugins/API/Reports/Get.php +++ b/plugins/API/Reports/Get.php @@ -67,7 +67,10 @@ class Get extends Report { $processedMetrics = array(); foreach ($this->reportsToMerge as $report) { - $processedMetrics = array_merge($processedMetrics, $report->getProcessedMetrics()); + $reportMetrics = $report->getProcessedMetrics(); + if (is_array($reportMetrics)) { + $processedMetrics = array_merge($processedMetrics, $reportMetrics); + } } return $processedMetrics; } |