Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Mar 24, 2014
2 parents eaf2799 + a2a0cd9 commit e9dd521
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ private function formatRow(array $row)
{
if (self::NULL_AS_EXCEPTION == $this->null_handling_mode) {
return $row;
} elseif (self::NULL_AS_EMPTY == $this->null_handling_mode) {
}

if (self::NULL_AS_EMPTY == $this->null_handling_mode) {
foreach ($row as &$value) {
if (is_null($value)) {
$value = '';
Expand Down
1 change: 1 addition & 0 deletions test/WriterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function testInsertNullToSkipCell()
'john,doe,[email protected]',
['john', null, '[email protected]'],
];

$this->csv->setNullHandlingMode(Writer::NULL_AS_SKIP_CELL);
foreach ($expected as $row) {
$this->csv->insertOne($row);
Expand Down

0 comments on commit e9dd521

Please sign in to comment.