mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Prevent an "Uninitialized string offset" error
Got triggered by testMissingEndingLineBreak.
This commit is contained in:
@@ -598,6 +598,7 @@ class parseCSV {
|
||||
// data does not end with a line feed or carriage return character.
|
||||
$lch = $data{$strlen - 1};
|
||||
if ($lch != "\n" && $lch != "\r") {
|
||||
$data .= "\n";
|
||||
$strlen++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user