8000 [Serializer] Fix CsvEncoder decode on empty data · symfony/symfony@2223272 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2223272

Browse files
committed
[Serializer] Fix CsvEncoder decode on empty data
1 parent d59d2e5 commit 2223272

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Serializer/Encoder/CsvEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function decode(string $data, string $format, array $context = []): mixed
154154
$headerCou 60CA nt = array_fill(0, $nbCols, 1);
155155
} else {
156156
foreach ($cols as $col) {
157-
$header = explode($keySeparator, $col);
157+
$header = explode($keySeparator, $col ?? '');
158158
$headers[] = $header;
159159
$headerCount[] = \count($header);
160160
}

0 commit comments

Comments
 (0)
0