Commit 1f98ff9571c for php.net
commit 1f98ff9571c498148101338f5caa15784dd8dff7
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date: Mon Aug 3 08:28:55 2026 -0400
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
diff --git a/main/streams/streams.c b/main/streams/streams.c
index cb75e322d92..a09a2180921 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 */