Re: Bug in System
| From: | Greg Beaver | Date: | Tue, 26 Apr 2005 16:03:06 +0000 |
| Subject: | Re: Bug in System | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-37416@lists.php.net to get a copy of this message | ||
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)) {this was reported a while ago and is fixed in PEAR 1.4.0a11 Gregif ($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)