Skip to content

Commit

Permalink
Fix for processing file with Windows EOL
Browse files Browse the repository at this point in the history
  • Loading branch information
A Reddit User committed Jun 24, 2019
1 parent 1ecb783 commit 414c778
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
throw new RuntimeException('Failed to open: ' . $inputFile);
}

$data = file($inputFile);
$data = file($inputFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);

// First line should contain date information
$firstLine = array_shift($data);
Expand Down

0 comments on commit 414c778

Please sign in to comment.