Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #4749 ls() fails when connection is closed
Submitted: 2005-07-05 12:48 UTC
From: javascripter at mail dot ru Assigned: toby
Status: Closed Package: Net_FTP
PHP Version: 5.0.4 OS: Windows XP SP2
Roadmaps: (Not assigned)    
Subscription  


 [2005-07-05 12:48 UTC] javascripter at mail dot ru
Description: ------------ A call to Net_FTP::ls() fails with Fatal Error when connection is closed by the server. If I'm right, the problem lies in _ls_both($dir) function which misses PEAR::isError($list_splitted) check. Reproduce code: --------------- The following piece of code function _ls_both($dir) { $list_splitted = $this->_list_and_parse($dir); if (!is_array($list_splitted["files"])) { $list_splitted["files"] = array(); } [...skipped...] } should look like function _ls_both($dir) { $list_splitted = $this->_list_and_parse($dir); if (PEAR::isError($list_splitted)) { return $list_splitted; } if (!is_array($list_splitted["files"])) { $list_splitted["files"] = array(); } [...skipped...] } Actual result: -------------- Fatal Error: Cannot use object of type PEAR_Error as array in C:\Server\php5\PEAR\Net\FTP.php on line 1924

Comments

 [2006-02-09 22:54 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!