Home » Structures » Structures_DataGrid_DataSource_CSV » Bug #8271
bind() fails, if $csv parameter is a string longer than 255 characters
Details
| Submitted | 2006-07-24 08:31 UTC |
|---|---|
| From | gramlich at eosc dot de |
| Assigned | wiesemann |
| Status | Closed |
| Package | Structures_DataGrid_DataSource_CSV |
| PHP Version | 4.3.8 |
| Roadmaps | (Not assigned) |
Comments
[2006-07-24 08:31 UTC] gramlich at eosc dot de
Description:
------------
The bind() method fails with an error like
is_file() [function.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');
}