Skip to content

Commit

Permalink
Make csv reader binary safe
Browse files Browse the repository at this point in the history
  • Loading branch information
akondas committed Dec 6, 2016
1 parent 12d0add commit c4f0d1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Phpml/Dataset/CsvDataset.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(string $filepath, int $features, bool $headingRow =
throw DatasetException::missingFile(basename($filepath));
}

if (false === $handle = fopen($filepath, 'r')) {
if (false === $handle = fopen($filepath, 'rb')) {
throw DatasetException::cantOpenFile(basename($filepath));
}

Expand Down

0 comments on commit c4f0d1e

Please sign in to comment.