diff --git a/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php b/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php index af977be57..4a42db3b0 100644 --- a/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php +++ b/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php @@ -84,6 +84,10 @@ class CSVFormatter extends AbstractFormatter $delimiterLength = strlen($this->delimiter); $lineReturnLength = strlen($this->lineReturn); + if ($firstRow === null) { + return ""; + } + /** * check if $this->order doesn't have non-existing rows */