diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php index af61a33a0a45f5a45f8b67d205c3a67b7eb69fb9..5f959864cb342abc7290f0c2f3983853f799c756 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 11a4df5d6a595b06406f001202b2c01d583c204a..de087d0a8633296ecbdde3c56059a2eaa5e97375 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; }