mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-28 02:58:52 -04:00
Strip eol characters from imported csv line (#311)
This commit is contained in:
1 parent
09dd7eca58
commit
8fc24219fb
1 file changed
+2
-2
@@ -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 ++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user