From dcf5a1fbd1fa2c98b7336d587049dea0a5716af8 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 31 Jul 2026 08:19:00 -0400 Subject: [PATCH] streams: tidy the wrapper error log when the opener succeeds 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 --- main/streams/streams.c | 1 + 1 file changed, 1 insertion(+) 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 */