#39458 [Asn]: ftp_nlist returns false on empty directories
| From: | brain at eucoders dot com | Date: | Fri, 10 Nov 2006 16:18:31 +0000 |
| Subject: | #39458 [Asn]: ftp_nlist returns false on empty directories | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-104771@lists.php.net to get a copy of this message | ||
ID: 39458
User updated by: brain at eucoders dot com
Reported By: brain at eucoders dot com
Status: Assigned
Bug Type: FTP related
Operating System: Rehat Linux
PHP Version: 4.4.4
Assigned To: sesser
New Comment:
It appears that this problem appears on php 4.4.4 and also 4.3.2
version. Other versions should contain the same problem.
Previous Comments:
------------------------------------------------------------------------
[2006-11-10 14:20:22] brain at eucoders dot com
The problem is that the developer cannot use this ftp_rawlist in case
the directory do not exist. In that case, ftp_nlist will return false
(unreliable result) and ftp_rawlist return Array() which is again
unreliable.
The best fix would be that ftp_nlist return false when the directory
does not exist, and Array() when directory is empty.
------------------------------------------------------------------------
[2006-11-10 12:07:43] brain at eucoders dot com
It seems that ftp_rawlist has the corrected behaviour and it is
returning an empty array.
------------------------------------------------------------------------
[2006-11-10 12:06:11] brain at eucoders dot com
ftp_nlist returns false on empty directories instead of empty array
------------------------------------------------------------------------
[2006-11-10 12:04:54] brain at eucoders dot com
Description:
------------
ftp_nlist returns false on empty directories
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39458&edit=1