Skip to content

Commit 9b01ee6

Browse files
committed
streams: tidy the wrapper error log on every open_wrapper return
Before the early-return refactor in d75f79e 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.
1 parent 0dc8a54 commit 9b01ee6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

main/streams/streams.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,6 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(const char *path, const char *mod
21412141
php_stream_display_wrapper_name_errors(wrapper_name, context, PHP_STREAM_EC(OpenFailed),
21422142
"Failed to open stream");
21432143
}
2144-
php_stream_tidy_wrapper_name_error_log(wrapper_name);
21452144
goto cleanup;
21462145
}
21472146

@@ -2213,6 +2212,7 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(const char *path, const char *mod
22132212
}
22142213

22152214
cleanup:
2215+
php_stream_tidy_wrapper_name_error_log(wrapper_name);
22162216
pefree(wrapper_name, persistent);
22172217
cleanup_no_wrapper_name:
22182218
if (resolved_path) {

0 commit comments

Comments
 (0)