mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
Fix bug #53913 (Streams functions assume HAVE_GLOB is defined). Patch by Chris
Jones.
This commit is contained in:
parent
c5e86e5a8e
commit
2b4fb94e8e
2 changed files with 4 additions and 0 deletions
|
@ -3613,7 +3613,9 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
|
||||||
|
|
||||||
php_register_url_stream_wrapper("php", &php_stream_php_wrapper TSRMLS_CC);
|
php_register_url_stream_wrapper("php", &php_stream_php_wrapper TSRMLS_CC);
|
||||||
php_register_url_stream_wrapper("file", &php_plain_files_wrapper TSRMLS_CC);
|
php_register_url_stream_wrapper("file", &php_plain_files_wrapper TSRMLS_CC);
|
||||||
|
#ifdef HAVE_GLOB
|
||||||
php_register_url_stream_wrapper("glob", &php_glob_stream_wrapper TSRMLS_CC);
|
php_register_url_stream_wrapper("glob", &php_glob_stream_wrapper TSRMLS_CC);
|
||||||
|
#endif
|
||||||
php_register_url_stream_wrapper("data", &php_stream_rfc2397_wrapper TSRMLS_CC);
|
php_register_url_stream_wrapper("data", &php_stream_rfc2397_wrapper TSRMLS_CC);
|
||||||
#ifndef PHP_CURL_URL_WRAPPERS
|
#ifndef PHP_CURL_URL_WRAPPERS
|
||||||
php_register_url_stream_wrapper("http", &php_stream_http_wrapper TSRMLS_CC);
|
php_register_url_stream_wrapper("http", &php_stream_http_wrapper TSRMLS_CC);
|
||||||
|
|
|
@ -855,9 +855,11 @@ static php_stream *php_plain_files_dir_opener(php_stream_wrapper *wrapper, char
|
||||||
DIR *dir = NULL;
|
DIR *dir = NULL;
|
||||||
php_stream *stream = NULL;
|
php_stream *stream = NULL;
|
||||||
|
|
||||||
|
#ifdef HAVE_GLOB
|
||||||
if (options & STREAM_USE_GLOB_DIR_OPEN) {
|
if (options & STREAM_USE_GLOB_DIR_OPEN) {
|
||||||
return php_glob_stream_wrapper.wops->dir_opener(&php_glob_stream_wrapper, path, mode, options, opened_path, context STREAMS_REL_CC TSRMLS_CC);
|
return php_glob_stream_wrapper.wops->dir_opener(&php_glob_stream_wrapper, path, mode, options, opened_path, context STREAMS_REL_CC TSRMLS_CC);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir(path TSRMLS_CC)) {
|
if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir(path TSRMLS_CC)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue