Should fix #99 (zeros breaking lines)

see https://github.com/parsecsv/parsecsv-for-php/issues/99
This commit is contained in:
Salem Ouerdani
2017-10-10 17:59:49 +01:00
committed by Fonata
parent b9cf7cb0c1
commit 1321c3b693

View File

@@ -731,7 +731,7 @@ class parseCSV {
}
// end of field/row/csv
} elseif (($ch == $this->delimiter || $ch == "\n" || $ch == "\r" || $ch === false) && !$enclosed) {
} elseif (($ch === $this->delimiter || $ch == "\n" || $ch == "\r" || $ch === false) && !$enclosed) {
$key = (!empty($head[$col])) ? $head[$col] : $col;
$row[$key] = ($was_enclosed) ? $current : trim($current);
$current = '';