Re: Bug in System
| From: | Helgi Þormar | Date: | Tue, 26 Apr 2005 06:56:05 +0000 |
| Subject: | Re: Bug in System | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-37410@lists.php.net to get a copy of this message | ||
Well it's a part of PEAR so it might be good to report it there ?
Tho I think we should separate that package into it's own package but of
course keep things like they are in pear it self ... Just to allow
separated release cycles and bug reports for that specific package :)
What ya think Greg ?
*pokes also about ErrorStack*
- Helgi
On Tue, 2005-04-26 at 16:40 +1000, Alex Hayes wrote:
> 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
>