diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-01-06 00:56:29 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-01-06 00:56:55 +0300 |
commit | e6f17c270c775c1f50c6a23b22715d2fe75b8746 (patch) | |
tree | 6894eee90615ba8b59e593ac93186f56008615c2 | |
parent | fb24efd2880f012a1ca95896f00c8eb5367c9dc9 (diff) |
Fixes #6924
plugins/API/Reports/Get.php(70): Warning - array_merge(): Argument 2 is not an array
-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; } |