PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » PEAR » PEAR » Bug #1329

closedir is missing PEAR::Command->registerCommands function

Details

Submitted2004-05-03 08:48 UTC
Fromkameshj at fastmail dot fm
Assignedpajoye
StatusClosed
PackagePEAR
PHP Version5.0.0RC2 (Release Candidate 2)
OSLinux
Roadmaps(Not assigned)

Comments

[2004-05-03 08:48 UTC] kameshj at fastmail dot fm

Description:
------------
File
php-src/pear/PEAR/Command.php
Class
PEAR_Command
Method
registerCommands
This method does opendir of 'PEAR/Command' but fails to
close the directory.
It should be closed after the readdir while loop.
I am pasting the patch here.

Index: Command.php
===================================================================
RCS file: /repository/php-src/pear/PEAR/Command.php,v
retrieving revision 1.23
diff -u -r1.23 Command.php
--- Command.php 27 Feb 2004 02:24:06 -0000 1.23
+++ Command.php 27 Apr 2004 11:10:23 -0000
@@ -280,6 +280,7 @@
$GLOBALS['_PEAR_Command_shortcuts'][$shortcut] =
$command;
}
}
+ @closedir($dp);
return true;
}

[2004-05-16 15:34 UTC] paj at pearfr dot org

This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.

Thank you for the report, and for helping us make PEAR better.