ENH CSV BOM stripping is now handled internally by league/csv

This commit is contained in:
Dan Hensby 2020-03-26 09:55:26 +00:00 committed by Guy Sartorelli
parent 2ae52120c1
commit a666814a80
No known key found for this signature in database
GPG Key ID: F313E3B9504D496A

View File

@ -76,14 +76,7 @@ class CsvBulkLoader extends BulkLoader
$filepath = Director::getAbsFile($filepath);
$csvReader = Reader::createFromPath($filepath, 'r');
$csvReader->setDelimiter($this->delimiter);
// league/csv 9
if (method_exists($csvReader, 'skipInputBOM')) {
$csvReader->skipInputBOM();
// league/csv 8
} else {
$csvReader->stripBom(true);
}
$tabExtractor = function ($row, $rowOffset) {
foreach ($row as &$item) {