From 495552085e8144363ee430843167e40e61fd0d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=BDborn=C3=BD=20Adam?= Date: Mon, 9 May 2022 16:41:31 +0200 Subject: [PATCH] Work with empty string when value is null --- src/CsvWriter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CsvWriter.php b/src/CsvWriter.php index e20f288..10364ff 100644 --- a/src/CsvWriter.php +++ b/src/CsvWriter.php @@ -120,7 +120,7 @@ public function rowToStr(array $row) } $return[] = $this->getEnclosure() . - str_replace($this->getEnclosure(), str_repeat($this->getEnclosure(), 2), $column) . + str_replace($this->getEnclosure(), str_repeat($this->getEnclosure(), 2), $column ?? '') . $this->getEnclosure(); } return implode($this->getDelimiter(), $return) . $this->lineBreak;