Merge pull request #10459 from creative-commoners/pulls/5/rescue-master-no-dual-support

ENH Rescue Master Branch Commits: CSV BOM stripping is now handled internally by league/csv
This commit is contained in:
Steve Boyd 2022-08-25 10:01:50 +12:00 committed by GitHub
commit 934fafd29d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {