Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0

Bug #11526 DiscoverFormat returns wrong nr of fields
Submitted: 2007-07-05 08:29 UTC
From: lagonix Assigned: dufuz
Status: Closed Package: File_CSV (version 1.3.0)
PHP Version: 5.2.1 OS: Debian/ubuntu
Roadmaps: (Not assigned)    
Subscription  


 [2007-07-05 08:29 UTC] lagonix (Brian Lagoni)
Description: ------------ When using discoverformat on a CVS file, the returned array contains wrong nr. of fields. Test script: --------------- CSV File contains this line: "ID","Name","email","a","b","c","male","","","10","11","12" $path = "path to CSV file"; $csv = new File_CSV(); $conf = $csv->discoverFormat( $path ); echo $conf["fields"]; Expected result: ---------------- The $conf["fields"] should be 12 But if the CSV file is changed into "ID","Name","email","a","b","c","male","","9","10","11","12" the "fields" is 12. Actual result: -------------- But $conf["fields"] is 11

Comments

 [2007-12-04 21:57 UTC] dufuz (Helgi Þormar Þorbjörnsson)
What File version are you using ?
 [2007-12-05 11:55 UTC] lagonix (Brian Lagoni)
Sorry I forgot to add the version.. I am using File version 1.3.0. If I downgrade to File version 1.2.2 it works as expected.
 [2008-10-21 21:08 UTC] dufuz (Helgi Þormar Þorbjörnsson)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.