diff --git a/Export/ExportManager.php b/Export/ExportManager.php index c3bc50672..143e739de 100644 --- a/Export/ExportManager.php +++ b/Export/ExportManager.php @@ -418,6 +418,15 @@ class ExportManager $result = $export->getResult($query, $data[ExportType::EXPORT_KEY]); + if (!is_array($result)) { + throw new \UnexpectedValueException( + sprintf( + 'The result of the export should be an array, %s given', + gettype($result) + ) + ); + } + /* @var $formatter Formatter\CSVFormatter */ $formatter = $this->getFormatter($this->getFormatterAlias($data)); $filters = array();