[php-src] master: streams: use new stream error API in _php_stream_opendir()

From: Date: Wed, 29 Jul 2026 14:07:07 +0000
Subject: [php-src] master: streams: use new stream error API in _php_stream_opendir()
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-140312@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-07-29T15:06:59+01:00 Commit: https://github.com/php/php-src/commit/29c237bf881e48bff719503b04880873bbe0c91c Raw diff: https://github.com/php/php-src/commit/29c237bf881e48bff719503b04880873bbe0c91c.diff streams: use new stream error API in _php_stream_opendir() Changed paths: M main/streams/streams.c Diff: diff --git a/main/streams/streams.c b/main/streams/streams.c index 59297ed8ba8b..740a1d7a6e06 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; }

« previous php.cvs (#140312) next »