Skip to content

Commit

Permalink
Improve Conversion method
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Jun 5, 2015
1 parent 4f23c95 commit 633aad5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/AbstractCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ protected function getConversionIterator()
$iterator->setFlags($this->flags|SplFileObject::READ_AHEAD|SplFileObject::SKIP_EMPTY);
$iterator = $this->applyBomStripping($iterator);
$iterator = new CallbackFilterIterator($iterator, function ($row) {
return is_array($row);
return is_array($row) && [null] != $row;
});
$iterator = $this->applyIteratorFilter($iterator);
$iterator = $this->applyIteratorSortBy($iterator);
Expand Down
2 changes: 1 addition & 1 deletion test/CsvTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function testToXML()

public function testJsonSerialize()
{
$this->assertContains(['john', 'doe', '[email protected]'], json_decode(json_encode($this->csv), true));
$this->assertSame($this->expected, json_decode(json_encode($this->csv), true));
}

/**
Expand Down

0 comments on commit 633aad5

Please sign in to comment.