From 81454c047da7184cf176b96182f1a63cfb05d8a4 Mon Sep 17 00:00:00 2001 From: Benjamin Perche Date: Fri, 1 Aug 2014 16:28:40 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20bug=20if=20there's=20no=20row=20=09modifi?= =?UTF-8?q?=C3=A9:=20=20=20=20=20=20=20=20=20core/lib/Thelia/Core/FileForm?= =?UTF-8?q?at/Formatting/Formatter/CSVFormatter.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Core/FileFormat/Formatting/Formatter/CSVFormatter.php | 4 ++++ 1 file changed, 4 insertions(+) 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 */