Commit 29c237bf881 for php.net
commit 29c237bf881e48bff719503b04880873bbe0c91c
Author: Gina Peter Banyard <girgias@php.net>
Date: Mon Jul 20 19:48:12 2026 +0100
streams: use new stream error API in _php_stream_opendir()
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 59297ed8ba8..740a1d7a6e0 100644
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -2035,20 +2035,13 @@ PHPAPI php_stream *_php_stream_opendir(const char *path, int options,
wrapper = php_stream_locate_url_wrapper(path, &path_to_open, options);
if (UNEXPECTED(wrapper == NULL)) {
- if (options & REPORT_ERRORS) {
- php_stream_display_wrapper_errors(NULL, context, PHP_STREAM_EC(OpenFailed),
- "Failed to open directory");
- php_stream_tidy_wrapper_error_log(wrapper);
- }
+ php_stream_wrapper_warn_name(PHP_STREAM_ERROR_WRAPPER_DEFAULT_NAME, context, options, OpenFailed,
+ "Failed to open directory");
return NULL;
}
if (UNEXPECTED(!wrapper->wops->dir_opener)) {
- php_stream_wrapper_log_warn(wrapper, context, options & ~REPORT_ERRORS,
- NoOpener, "not implemented");
- php_stream_display_wrapper_errors(wrapper, context, PHP_STREAM_EC(OpenFailed),
- "Failed to open directory");
- php_stream_tidy_wrapper_error_log(wrapper);
+ php_stream_wrapper_warn(wrapper, context, options, NoOpener, "Failed to open directory: not implemented");
return NULL;
}