|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67154 ftp_nlist may return null value
Submitted: 2014-04-30 07:56 UTC Modified: 2014-04-30 08:39 UTC
From: Laurent dot Lyaudet at gmail dot com Assigned:
Status: Not a bug Package: FTP related
PHP Version: 5.4.27 OS: Debian wheezy
Private report: No CVE-ID: None
 [2014-04-30 07:56 UTC] Laurent dot Lyaudet at gmail dot com
According to the documentation ftp_nlist should only return array or false value
but if parameters are incorrect it may return a null value (see test script).
I don't know if it may be useful in some situations. 
Hence I don't know if the code should be corrected or if the documentation should be completed.
Let me know if you think the problem is in the documentation. In that case, I'll modify it.

Best regards,
   Laurent Lyaudet

Test script:
var_dump(ftp_nlist(false, ''));

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-30 08:39 UTC]
-Status: Open +Status: Not a bug
 [2014-04-30 08:39 UTC]
Though not documented for each one individually, by convention the built-in functions will return null if you pass an incorrect type of parameter.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 01:01:27 2024 UTC