[php-src] master: streams: tidy the wrapper error log when the opener succeeds (#22977)
| From: | Ilia Alshanetsky via GitHub | Date: | Mon, 03 Aug 2026 12:28:58 +0000 |
| Subject: | [php-src] master: streams: tidy the wrapper error log when the opener succeeds (#22977) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-140431@lists.php.net to get a copy of this message | ||
Author: Ilia Alshanetsky (iliaal)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-08-03T13:28:55+01:00
Commit: https://github.com/php/php-src/commit/1f98ff9571c498148101338f5caa15784dd8dff7
Raw diff: https://github.com/php/php-src/commit/1f98ff9571c498148101338f5caa15784dd8dff7.diff
streams: tidy the wrapper error log when the opener succeeds (#22977)
Before the early-return refactor in d75f79e2acf the tidy call sat on the
single return path, so it ran whether or not the opener produced a stream.
It now runs only when the opener fails, so anything the opener stored while
REPORT_ERRORS was masked stays in FG(wrapper_logged_errors) until request
shutdown and is replayed by the next failure for the same wrapper.
Closes GH-22977
Changed paths:
M main/streams/streams.c
Diff:
diff --git a/main/streams/streams.c b/main/streams/streams.c
index cb75e322d928..a09a2180921d 100644
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -2144,6 +2144,7 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(const char *path, const char
*mod
php_stream_tidy_wrapper_name_error_log(wrapper_name);
goto cleanup;
}
+ php_stream_tidy_wrapper_name_error_log(wrapper_name);
/* if the caller asked for a persistent stream but the wrapper did not
* return one, force an error here */