php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch glob.diff.txt for Streams related Bug #53913

Patch version 2011-02-02 22:54 UTC

Return to Bug #53913 | Download this patch
Patch Revisions:

Developer: sixd

Index: ext/standard/basic_functions.c
===================================================================
--- ext/standard/basic_functions.c	(revision 307921)
+++ ext/standard/basic_functions.c	(working copy)
@@ -3648,7 +3648,9 @@
 
 	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: main/streams/plain_wrapper.c
===================================================================
--- main/streams/plain_wrapper.c	(revision 307921)
+++ main/streams/plain_wrapper.c	(working copy)
@@ -855,9 +855,11 @@
 	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;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 08:01:28 2024 UTC