Skip to content

Commit d5bc659

Browse files
committed
address comment for csv escaping.
1 parent 4d029df commit d5bc659

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Migration/Sources/CSV.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,8 @@ private function exportDocuments(int $batchSize): void
216216
if ($parsedValue === '') {
217217
$parsedData[$key] = [];
218218
} else {
219-
$arrayValues = str_contains($parsedValue, ',')
220-
? array_map('trim', explode(',', $parsedValue))
221-
: [$parsedValue];
219+
$arrayValues = str_getcsv($parsedValue);
220+
$arrayValues = array_map('trim', $arrayValues);
222221

223222
$parsedData[$key] = array_map(function ($item) use ($type) {
224223
return match ($type) {

0 commit comments

Comments
 (0)