Skip to content

Commit 4955520

Browse files
committed
Work with empty string when value is null
1 parent 9f44e45 commit 4955520

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CsvWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function rowToStr(array $row)
120120
}
121121

122122
$return[] = $this->getEnclosure() .
123-
str_replace($this->getEnclosure(), str_repeat($this->getEnclosure(), 2), $column) .
123+
str_replace($this->getEnclosure(), str_repeat($this->getEnclosure(), 2), $column ?? '') .
124124
$this->getEnclosure();
125125
}
126126
return implode($this->getDelimiter(), $return) . $this->lineBreak;

0 commit comments

Comments
 (0)