improve script for downloading exports

This commit is contained in:
2018-06-12 17:58:02 +02:00
parent dd05fa0be7
commit 587b248549
6 changed files with 114 additions and 50 deletions

View File

@@ -437,16 +437,16 @@ class ExportManager
$result = $export->getResult($query, $data[ExportType::EXPORT_KEY]);
if (!is_array($result)) {
if (!is_iterable($result)) {
throw new \UnexpectedValueException(
sprintf(
'The result of the export should be an array, %s given',
'The result of the export should be an iterable, %s given',
gettype($result)
)
);
}
/* @var $formatter Formatter\CSVFormatter */
/* @var $formatter FormatterInterface */
$formatter = $this->getFormatter($this->getFormatterAlias($data));
$filtersData = array();
$aggregatorsData = array();