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

Bug #18747 Filter columns with $csv->connect($array)
Submitted: 2011-08-22 03:49 UTC
From: bery Assigned:
Status: Open Package: File_CSV_DataSource (version 1.0.1)
PHP Version: 5.2.12 OS: Windows 7 SP 1
Roadmaps: (Not assigned)    
Subscription  


 [2011-08-22 03:49 UTC] bery (Lukas Beranek)
Description: ------------ When filtering CSV data with connect(array()) I have encountered a strange bug. In your code you use $columns === array() which does not work and always returns false. I replaced it with is_array() function and everything works as supposed. Test script: --------------- $arr = array("a","b","c"); if(is_array($arr) return "ok\r\n"; if($arr === array()) return "array too"; //prints ok Expected result: ---------------- ok array too Actual result: -------------- ok Just note - you miss PHP version 5.2.17 so I chose the rearst option.

Comments