Home » File Formats » File_CSV » Bug #5257
File_CSV: delimiter problem if first field is empty
Details
| Submitted | 2005-08-31 15:02 UTC |
|---|---|
| From | ionut at browse dot ro |
| Assigned | dufuz |
| Status | Closed |
| Package | File_CSV |
| PHP Version | 5.0.3 |
| OS | linux |
| Roadmaps | (Not assigned) |
Comments
[2005-08-31 15:02 UTC] ionut at browse dot ro
Description:
------------
If the CSV file contains a row with the first field empty then the whole row is shifted with 1 column and the first comma appears in the second field.
Test script:
---------------
At line 240 the test logic needed change. Was:
if (!$in_quote && ($c == $conf['sep'] || $c == "\n" || $c == "\r") && $prev != '') {
Changed to:
if (!$in_quote && ((($c == "\n" || $c == "\r") && $prev != '') || ($c == $conf['sep']) ) ) {
After the modification the