Skip to content

Commit

Permalink
Merge pull request goodby#22 from emmanuelgautier/master
Browse files Browse the repository at this point in the history
Bug fix: error when the last line is empty
  • Loading branch information
reoring committed Nov 22, 2013
2 parents f9a7e10 + 9b440c9 commit 51386ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Goodby/CSV/Import/Standard/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function parse($filename, InterpreterInterface $interpreter)
setlocale(LC_ALL, 'en_US.UTF-8');

foreach ( $csv as $lineNumber => $line ) {
if ($ignoreHeader && $lineNumber == 0) {
if ($ignoreHeader && $lineNumber == 0 || (count($line) === 1 && empty($line[0]))) {
continue;
}
$interpreter->interpret($line);
Expand Down

0 comments on commit 51386ed

Please sign in to comment.