Doc #64860 [Opn]: Missing documentation for new return value in function is_file

From: Date: Wed, 27 May 2015 17:35:12 +0000
Subject: Doc #64860 [Opn]: Missing documentation for new return value in function is_file
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12373@lists.php.net to get a copy of this message
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
 Type:               Documentation Problem
 Package:            Documentation problem
 Operating System:   all
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

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>


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.doc.bugs (#12373) next »