diff --git a/src/Csv/Generator.php b/src/Csv/Generator.php index 03387cd..b6ad7d3 100644 --- a/src/Csv/Generator.php +++ b/src/Csv/Generator.php @@ -34,7 +34,8 @@ function ($fileHandle) use ($line): void { $fileHandle, $this->insertSpecialPlaceholder($line), FormatInterface::DELIMITER, - FormatInterface::ENCLOSURE + FormatInterface::ENCLOSURE, + '', ); } ); @@ -50,7 +51,8 @@ function ($fileHandle) use ($lines): void { $fileHandle, $this->insertSpecialPlaceholder($line), FormatInterface::DELIMITER, - FormatInterface::ENCLOSURE + FormatInterface::ENCLOSURE, + '', ); } } diff --git a/src/Csv/Parser.php b/src/Csv/Parser.php index 28c46d6..69d27fb 100644 --- a/src/Csv/Parser.php +++ b/src/Csv/Parser.php @@ -30,7 +30,7 @@ public function parse(string $csv): array $data = []; - while ($csvLine = fgetcsv($tmpHandle, 0, FormatInterface::DELIMITER, FormatInterface::ENCLOSURE)) { + while ($csvLine = fgetcsv($tmpHandle, 0, FormatInterface::DELIMITER, FormatInterface::ENCLOSURE, '')) { $data[] = array_map( static function ($item) { if (!is_string($item)) {