Skip to content

Commit

Permalink
Merge pull request silverstripe#10459 from creative-commoners/pulls/5…
Browse files Browse the repository at this point in the history
…/rescue-master-no-dual-support

ENH Rescue Master Branch Commits: CSV BOM stripping is now handled internally by league/csv
  • Loading branch information
emteknetnz authored Aug 24, 2022
2 parents feb57db + a666814 commit 934fafd
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Dev/CsvBulkLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,7 @@ protected function processAll($filepath, $preview = false)
$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);
}
$csvReader->skipInputBOM();

$tabExtractor = function ($row, $rowOffset) {
foreach ($row as &$item) {
Expand Down

0 comments on commit 934fafd

Please sign in to comment.