Skip to content

Commit 51386ed

Browse files
committed
Merge pull request #22 from emmanuelgautier/master
Bug fix: error when the last line is empty
2 parents f9a7e10 + 9b440c9 commit 51386ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Goodby/CSV/Import/Standard/Lexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function parse($filename, InterpreterInterface $interpreter)
5555
setlocale(LC_ALL, 'en_US.UTF-8');
5656

5757
foreach ( $csv as $lineNumber => $line ) {
58-
if ($ignoreHeader && $lineNumber == 0) {
58+
if ($ignoreHeader && $lineNumber == 0 || (count($line) === 1 && empty($line[0]))) {
5959
continue;
6060
}
6161
$interpreter->interpret($line);

0 commit comments

Comments
 (0)