Bug #76735 [Ver->Csd]: Incorrect message in fopen on invalid mode
Edit report at https://bugs.php.net/bug.php?id=76735&edit=1
ID: 76735
Updated by: cmb@php.net
Reported by: robert dot jelen at email dot cz
Summary: Incorrect message in fopen on invalid mode
-Status: Verified
+Status: Closed
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:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2576c57a5133df757c51f341e794bf53add7663f
Log: Fix #76735: Incorrect message in fopen on invalid mode
Previous Comments:
------------------------------------------------------------------------
[2020-09-22 12:59:38] cmb@php.net
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
------------------------------------------------------------------------
[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
Thread (4 messages)