Doc #81067 [Com]: fpassthru no false
| From: | simbiat at outlook dot com | Date: | Sat, 22 May 2021 19:43:55 +0000 |
| Subject: | Doc #81067 [Com]: fpassthru no false | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18788@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81067&edit=1
ID: 81067
Comment by: simbiat at outlook dot com
Reported by: simbiat at outlook dot com
Summary: fpassthru no false
Status: Verified
Type: Documentation Problem
Package: Filesystem function related
PHP Version: 8.0.6
Block user comment: N
Private report: N
New Comment:
That's fine, but this needs to be reflected in the manual.
Previous Comments:
------------------------------------------------------------------------
[2021-05-21 16:37:48] cmb@php.net
Prior to PHP 8.0.0, fpassthru() returned false if a resource was
passed which is not an open stream. As of PHP 8.0.0, a TypeError
is thrown instead. Cf. <https://3v4l.org/gNerI>.
------------------------------------------------------------------------
[2021-05-21 16:12:57] simbiat at outlook dot com
Description:
------------
According to https://www.php.net/manual/en/function.fpassthru.php
fpassthru can return
false, even though definition is "fpassthru ( resource
$stream ) : int". So, there is a contradiction and it seems like in description, rather in
definition. Unless it's planned to replace Fatal Error with false return.
Expected result:
----------------
Correct description of return values is expected
Actual result:
--------------
Promises false in case of error.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81067&edit=1