Skip to content

Commit 72c8669

Browse files
authored
Merge pull request #2 from hpacleb/fix-get-headers
fix: Sanitize headers
2 parents e485ac9 + 3274bf3 commit 72c8669

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)