Skip to content

Commit

Permalink
Work with empty string when value is null
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVyborny committed May 9, 2022
1 parent 9f44e45 commit 4955520
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CsvWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4955520

Please sign in to comment.