Strip eol characters from imported csv line (#311)

This commit is contained in:
jekkos committed 2016-03-17 12:20:28 +01:00
1 parent 09dd7eca58
commit 8fc24219fb
1 file changed
+2 -2
+2 -2
View File
@@ -9,7 +9,7 @@ function csvstring_to_array(&$string, $CSV_SEPARATOR = ',', $CSV_ENCLOSURE = '"'
$i = 0;
while ( $i < $cnt ) {
$s = $string [$i];
while (sizeof($o) <= $num) {
$o [] = "";
}
@@ -48,7 +48,7 @@ function csvstring_to_array(&$string, $CSV_SEPARATOR = ',', $CSV_ENCLOSURE = '"'
$o [$num] .= $CSV_ENCLOSURE;
$escesc = false;
}
$o [$num] .= $s;
$o [$num] .= preg_replace("/\r|\n/", "", $s);;
}
$i ++;
}