Bug #67154 [Opn->Nab]: ftp_nlist may return null value

From: Date: Wed, 30 Apr 2014 08:39:49 +0000
Subject: Bug #67154 [Opn->Nab]: ftp_nlist may return null value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185513@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67154&edit=1 ID: 67154 Updated by: requinix@php.net Reported by: Laurent dot Lyaudet at gmail dot com Summary: ftp_nlist may return null value -Status: Open +Status: Not a bug Type: Bug Package: FTP related Operating System: Debian wheezy PHP Version: 5.4.27 Block user comment: N Private report: N New Comment: Though not documented for each one individually, by convention the built-in functions will return null if you pass an incorrect type of parameter. http://www.php.net/manual/en/functions.internal.php Previous Comments: ------------------------------------------------------------------------ [2014-04-30 07:56:39] Laurent dot Lyaudet at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=67154&edit=1

« previous php.bugs (#185513) next »