Prevent an "Uninitialized string offset" error

Got triggered by testMissingEndingLineBreak.
This commit is contained in:
Christian Bläul
2018-01-21 20:55:18 +01:00
committed by Fonata
parent b004911218
commit 488b8f9d9b
2 changed files with 16 additions and 0 deletions

View File

@@ -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++;
}