Skip to content

Commit 3274bf3

Browse files
committed
fix: Sanitize headers
1 parent e485ac9 commit 3274bf3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/CsvFile.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public function getHeaders(?int $length = null): array
135135
if ($headers === false) {
136136
return [];
137137
}
138+
$headers = array_map(fn ($header) => str_replace(["\r", "\n"], '', $header), $headers);
138139

139140
return $headers;
140141
}

0 commit comments

Comments
 (0)