Doc #64860 [Opn->Nab]: Missing documentation for new return value in function is_file
Edit report at https://bugs.php.net/bug.php?id=64860&edit=1
ID: 64860
Updated by: cmb@php.net
Reported by: spasic dot dejan at yahoo dot de
Summary: Missing documentation for new return value in
function is_file
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: Documentation problem
Operating System: all
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
> I'm not sure if there is the need for further documentation.
Actually, I'm rather sure that there's no need for further
documentation.
Previous Comments:
------------------------------------------------------------------------
[2015-05-27 17:35:11] cmb@php.net
As of PHP 5.4.0 function is_file() expects a valid path instead of
a general string (ZPP p instead of s). paths, however, must not
contain null bytes. In case of an invalid pathname a respective
warning is thrown. See also <http://3v4l.org/0TFFl>.
With regard to the return value there's already a note on the
"Internal (built-in) functions" man page[1]:
| If the parameters given to a function are not what it expects,
| such as passing an array where a string is expected, the return
| value of the function is undefined. In this case it will likely
| return NULL but this is just a convention, and cannot be relied
| upon.
I'm not sure if there is the need for further documentation.
[1] <http://php.net/manual/en/functions.internal.php>
------------------------------------------------------------------------
[2013-06-25 00:19:24] philip@php.net
What's the change? Does it affect other file functions? The PHP changelog does not
mention this (or so it seems) but if there is something to document here then the
following should also be updated:
http://us2.php.net/manual/en/security.filesystem.nullbytes.php
------------------------------------------------------------------------
[2013-05-16 13:02:28] spasic dot dejan at yahoo dot de
Description:
------------
PHP 5.4.x
It was added a new return value for the function is_file. When given parameter
which is given includes a trailing null byte, it returns NULL instead of FALSE.
This information is missing!
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64860&edit=1
Thread (4 messages)