Skip to content

Commit 29c237b

Browse files
committed
streams: use new stream error API in _php_stream_opendir()
1 parent 0c84160 commit 29c237b

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

main/streams/streams.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,20 +2035,13 @@ PHPAPI php_stream *_php_stream_opendir(const char *path, int options,
20352035

20362036
wrapper = php_stream_locate_url_wrapper(path, &path_to_open, options);
20372037
if (UNEXPECTED(wrapper == NULL)) {
2038-
if (options & REPORT_ERRORS) {
2039-
php_stream_display_wrapper_errors(NULL, context, PHP_STREAM_EC(OpenFailed),
2040-
"Failed to open directory");
2041-
php_stream_tidy_wrapper_error_log(wrapper);
2042-
}
2038+
php_stream_wrapper_warn_name(PHP_STREAM_ERROR_WRAPPER_DEFAULT_NAME, context, options, OpenFailed,
2039+
"Failed to open directory");
20432040
return NULL;
20442041
}
20452042

20462043
if (UNEXPECTED(!wrapper->wops->dir_opener)) {
2047-
php_stream_wrapper_log_warn(wrapper, context, options & ~REPORT_ERRORS,
2048-
NoOpener, "not implemented");
2049-
php_stream_display_wrapper_errors(wrapper, context, PHP_STREAM_EC(OpenFailed),
2050-
"Failed to open directory");
2051-
php_stream_tidy_wrapper_error_log(wrapper);
2044+
php_stream_wrapper_warn(wrapper, context, options, NoOpener, "Failed to open directory: not implemented");
20522045
return NULL;
20532046
}
20542047

0 commit comments

Comments
 (0)