aharvey                                  Fri, 04 Feb 2011 10:47:41 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=308011

Log:
Fix bug #53913 (Streams functions assume HAVE_GLOB is defined). Patch by Chris
Jones.

Bug: http://bugs.php.net/53913 (Assigned) Streams functions assume HAVE_GLOB is 
defined
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c
    U   php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c
    U   php/php-src/trunk/ext/standard/basic_functions.c
    U   php/php-src/trunk/main/streams/plain_wrapper.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2011-02-04 10:42:43 UTC (rev 308010)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-02-04 10:47:41 UTC (rev 308011)
@@ -145,6 +145,8 @@

 - 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)


Modified: php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2011-02-04 
10:42:43 UTC (rev 308010)
+++ php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2011-02-04 
10:47:41 UTC (rev 308011)
@@ -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);

Modified: php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c   2011-02-04 
10:42:43 UTC (rev 308010)
+++ php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c   2011-02-04 
10:47:41 UTC (rev 308011)
@@ -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;

Modified: php/php-src/trunk/ext/standard/basic_functions.c
===================================================================
--- php/php-src/trunk/ext/standard/basic_functions.c    2011-02-04 10:42:43 UTC 
(rev 308010)
+++ php/php-src/trunk/ext/standard/basic_functions.c    2011-02-04 10:47:41 UTC 
(rev 308011)
@@ -3613,7 +3613,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);

Modified: php/php-src/trunk/main/streams/plain_wrapper.c
===================================================================
--- php/php-src/trunk/main/streams/plain_wrapper.c      2011-02-04 10:42:43 UTC 
(rev 308010)
+++ php/php-src/trunk/main/streams/plain_wrapper.c      2011-02-04 10:47:41 UTC 
(rev 308011)
@@ -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 CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to