From d80354c85220eb638f6596ef5af842d45474176b Mon Sep 17 00:00:00 2001 From: falkone Date: Sat, 20 Nov 2021 16:52:22 +0100 Subject: [PATCH] fixes empty enclosure fixes Export with empty enclosure doesn't work correctly --- src/Goodby/CSV/Export/Standard/CsvFileObject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Goodby/CSV/Export/Standard/CsvFileObject.php b/src/Goodby/CSV/Export/Standard/CsvFileObject.php index da3f4d3..166739f 100644 --- a/src/Goodby/CSV/Export/Standard/CsvFileObject.php +++ b/src/Goodby/CSV/Export/Standard/CsvFileObject.php @@ -72,7 +72,7 @@ public function fputcsv($fields, $delimiter = null, $enclosure = null, $escape = $line = rtrim($line, "\n"). $this->newline; // if the enclosure was '' | false - if (empty($enclosure)) { + if (empty($enclosure) || $enclosure === "\0") { $line = str_replace("\0", '', $line); }