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

Bug #8271 bind() fails, if $csv parameter is a string longer than 255 characters
Submitted: 2006-07-24 08:31 UTC
From: gramlich at eosc dot de Assigned: wiesemann
Status: Closed Package: Structures_DataGrid_DataSource_CSV (version 0.1.2)
PHP Version: 4.3.8 OS:
Roadmaps: (Not assigned)    

 [2006-07-24 08:31 UTC] gramlich at eosc dot de (Gregor Gramlich)
Description: ------------ The bind() method fails with an error like is_file() []: Stat failed for A,Long,CSV,String,.................., (errno=36 - File name too long) for long strings as $csv parameters. It seems, that is_file only accepts string arguments with at most 255 characters. Please change line 79 in CSV.php (DataSource) --- CSV.phpBAK 2006-07-20 05:17:32.000000000 +0200 +++ CSV.php 2006-07-24 10:20:44.491502279 +0200 @@ -76,7 +76,7 @@ $this->setOptions($options); } - if (@is_file($csv)) { + if ((strlen($csv) < 256) && @is_file($csv)) { if (!$rowList = file($csv)) { return PEAR::raiseError('Could not read file'); }


 [2006-07-24 16:51 UTC] wiesemann (Mark Wiesemann)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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. --- I can't reproduce this on my system (PHP 5.1.2, WinXP SP2), but this additional check does not hurt anyway.