Bug in System
| From: | Alex Hayes | Date: | Tue, 26 Apr 2005 06:40:19 +0000 |
| Subject: | Bug in System | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-37409@lists.php.net to get a copy of this message | ||
Hello,
Well, I understand now that this should be reported to the bug tracker,
however I don't know if anyone else has realised this, but according to
http://pear.php.net/packages.php the System package
does not actually
exist, so I can't get to the bugs (easily) for this package etc... (im
assuming this is becuase it is because it exists as part of the base pear
packages? still annoying and could be confusing to users)
Well, there is a bug in the method _dirToStruct
The following is taken from line 115:
======8<======
while ($file = readdir($dir)) {
if ($file != '.' && $file != '..') {
$list[] = $file;
}
}
======>8======
This should be
======8<======
while (false !== ($file = readdir ($dir))) {
if ($file != '.' && $file != '..') {
$list[] = $file;
}
}
======>8======
A simple change, will allow the reading of directories properly (say for
instance in you have a directory called 0 it will cause the read to fail)
Thanks
Alex