Skip to content

Commit

Permalink
Merge pull request #63 from katzwebservices/master
Browse files Browse the repository at this point in the history
Fix issue with PHP empty() function checking the status of the first line
  • Loading branch information
suin committed Jun 29, 2015
2 parents 6760826 + b4e964d commit e71217b
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 @@ -57,7 +57,7 @@ public function parse($filename, InterpreterInterface $interpreter)
setlocale(LC_ALL, 'en_US.UTF-8');

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

0 comments on commit e71217b

Please sign in to comment.