Bug #67154 [NEW]: ftp_nlist may return null value
| From: | Laurent dot Lyaudet at gmail dot com | Date: | Wed, 30 Apr 2014 07:56:39 +0000 |
| Subject: | Bug #67154 [NEW]: ftp_nlist may return null value | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-185511@lists.php.net to get a copy of this message | ||
From: Laurent dot Lyaudet at gmail dot com
Operating system: Debian wheezy
PHP version: 5.4.27
Package: FTP related
Bug Type: Bug
Bug description:ftp_nlist may return null value
Description:
------------
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:
---------------
<?php
var_dump(ftp_nlist(false, ''));
?>
Expected result:
----------------
false
Actual result:
--------------
null
--
Edit bug report at https://bugs.php.net/bug.php?id=67154&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67154&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67154&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67154&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67154&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67154&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67154&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67154&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67154&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67154&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67154&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67154&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67154&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67154&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67154&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67154&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67154&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67154&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67154&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67154&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67154&r=mysqlcfg