Bug #76735 [PATCH]: Incorrect message in fopen on invalid mode
| From: | cmb@php.net | Date: | Tue, 22 Sep 2020 12:59:38 +0000 |
| Subject: | Bug #76735 [PATCH]: Incorrect message in fopen on invalid mode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229132@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76735&edit=1
ID: 76735
Patch added by: cmb@php.net
Reported by: robert dot jelen at email dot cz
Summary: Incorrect message in fopen on invalid mode
Status: Verified
Type: Bug
Package: Streams related
Operating System: Debian
PHP Version: 7.1.20
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The following pull request has been associated:
Patch Name: Fix #76735: Incorrect message in fopen on invalid mode
On GitHub: https://github.com/php/php-src/pull/6187
Patch: https://github.com/php/php-src/pull/6187.patch
Previous Comments:
------------------------------------------------------------------------
[2020-09-22 12:51:26] cmb@php.net
I can confirm the erroneous error message, although it is not
necessarily "Success", but rather what corresponds to the current
errno.
------------------------------------------------------------------------
[2018-08-13 07:19:05] robert dot jelen at email dot cz
Description:
------------
The message claims success, although it is a warning and the file fails to open.
Test script:
---------------
<?php
$f = fopen('existing.file', 'Q');
Expected result:
----------------
PHP Warning: fopen(existing.file): failed to open stream: Mode "Q" is not valid in
/home/robert/test.php on line 3
Actual result:
--------------
PHP Warning: fopen(existing.file): failed to open stream: Success in /home/robert/test.php on line
3
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76735&edit=1