]> granicus.if.org Git - php/commitdiff
Fix bug #53913 (Streams functions assume HAVE_GLOB is defined). Patch by Chris
authorAdam Harvey <aharvey@php.net>
Fri, 4 Feb 2011 10:47:41 +0000 (10:47 +0000)
committerAdam Harvey <aharvey@php.net>
Fri, 4 Feb 2011 10:47:41 +0000 (10:47 +0000)
Jones.

NEWS
ext/standard/basic_functions.c
main/streams/plain_wrapper.c

diff --git a/NEWS b/NEWS
index bf21f3a2c0c555f86539989078756f031e969731..880be94442ffd5ed0c811b6c00a81ea66100881f 100644 (file)
--- a/NEWS
+++ b/NEWS
 
 - Streams:
   . Implemented FR #26158 (open arbitrary file descriptor with fopen). (Gustavo)
+  . Fixed bug #53913 (Streams functions assume HAVE_GLOB is defined). (Chris
+    Jones)
   . Fixed bug #53903 (userspace stream stat callback does not separate the
     elements of the returned array before converting them). (Gustavo)
 
index 02300aee3dce0b40cb8eef087e474122ea934744..5c8be35f5d31b8facfce37b15ca564262fb9d1c0 100644 (file)
@@ -3648,7 +3648,9 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
 
        php_register_url_stream_wrapper("php", &php_stream_php_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);
+#endif
        php_register_url_stream_wrapper("data", &php_stream_rfc2397_wrapper TSRMLS_CC);
 #ifndef PHP_CURL_URL_WRAPPERS
        php_register_url_stream_wrapper("http", &php_stream_http_wrapper TSRMLS_CC);
index 96332df843a4d747d7f987c4737891a3275d82ce..9676e323d42dd893a650e33c48ba6bfa5601be8c 100644 (file)
@@ -855,9 +855,11 @@ static php_stream *php_plain_files_dir_opener(php_stream_wrapper *wrapper, char
        DIR *dir = NULL;
        php_stream *stream = NULL;
 
+#ifdef HAVE_GLOB
        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);
        }
+#endif
 
        if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir(path TSRMLS_CC)) {
                return NULL;