Bug #76735 [Opn->Ver]: Incorrect message in fopen on invalid mode

From: Date: Tue, 22 Sep 2020 12:51:26 +0000
Subject: Bug #76735 [Opn->Ver]: Incorrect message in fopen on invalid mode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229131@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 Updated by: cmb@php.net Reported by: robert dot jelen at email dot cz Summary: Incorrect message in fopen on invalid mode -Status: Open +Status: Verified Type: Bug Package: Streams related Operating System: Debian PHP Version: 7.1.20 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: I can confirm the erroneous error message, although it is not necessarily "Success", but rather what corresponds to the current errno. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#229131) next »