diff --git a/modules/datastore/src/Service/ImportService.php b/modules/datastore/src/Service/ImportService.php index a89c097c18..00a8a1aeb1 100644 --- a/modules/datastore/src/Service/ImportService.php +++ b/modules/datastore/src/Service/ImportService.php @@ -202,11 +202,15 @@ private function getNonRecordingParser(string $delimiter) : Csv { 'quote' => '"', 'escape' => "\\", 'record_end' => ["\n", "\r"], + 'trailing_delimiter' => FALSE, ]; $parserConfiguration = $this->dispatchEvent(self::EVENT_CONFIGURE_PARSER, $parserConfiguration); $parser = Csv::getParser($parserConfiguration['delimiter'], $parserConfiguration['quote'], $parserConfiguration['escape'], $parserConfiguration['record_end']); + if ($parserConfiguration['trailing_delimiter'] === TRUE) { + $parser->activateTrailingDelimiter(); + } $parser->machine->stopRecording(); return $parser; }