php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #81067 fpassthru no false
Submitted: 2021-05-21 16:12 UTC Modified: 2021-05-21 16:37 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: simbiat at outlook dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 8.0.6 OS:
Private report: No CVE-ID: None
 [2021-05-21 16:12 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-05-21 16:37 UTC] cmb@php.net
-Status: Open +Status: Verified -Package: phpdbg +Package: Filesystem function related
 [2021-05-21 16:37 UTC] 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-22 19:43 UTC] simbiat at outlook dot com
That's fine, but this needs to be reflected in the manual.
 [2021-05-25 08:24 UTC] git@php.net
Automatic comment on behalf of saundefined (author) and web-flow (committer)
Revision: https://github.com/php/doc-en/commit/98f2a733bc07e1c6d8fddb1d865b09fd79bdbea2
Log: fpassthru error description (#628)
 [2021-05-25 08:24 UTC] git@php.net
-Status: Verified +Status: Closed
 [2021-05-25 10:58 UTC] git@php.net
Automatic comment on behalf of mumumu
Revision: https://github.com/php/doc-ja/commit/3df27949f14930995ffac06c5b7fe67b735c39bc
Log: fpassthru error description (php/doc-en#628)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 11 14:01:27 2024 UTC