pollita         Tue Mar  6 20:04:05 2007 UTC

  Modified files:              
    /php-src/main/streams       streams.c 
  Log:
  Fix handling over overridden file:// wrapper
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.149&r2=1.150&diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.149 
php-src/main/streams/streams.c:1.150
--- php-src/main/streams/streams.c:1.149        Sat Mar  3 18:59:53 2007
+++ php-src/main/streams/streams.c      Tue Mar  6 20:04:05 2007
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.149 2007/03/03 18:59:53 helly Exp $ */
+/* $Id: streams.c,v 1.150 2007/03/06 20:04:05 pollita Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -2138,18 +2138,18 @@
                if (options & STREAM_LOCATE_WRAPPERS_ONLY) {
                        return NULL;
                }
-               
+
                /* The file:// wrapper may have been disabled/overridden */
-               if (FG(stream_wrappers)) {
-                       if (!wrapperpp || zend_hash_find(wrapper_hash, "file", 
sizeof("file"), (void**)&wrapperpp) == FAILURE) {
+               if (FG(stream_wrappers)) {
+                       if (zend_hash_find(wrapper_hash, "file", 
sizeof("file"), (void**)&wrapperpp) == FAILURE) {
                                if (options & REPORT_ERRORS) {
                                        php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Plainfiles wrapper disabled");
                                }
                                return NULL;
+                       } else {
+                               /* Handles overridden plain files wrapper */
+                               plain_files_wrapper = *wrapperpp;
                        }
-
-                       /* Handles overridden plain files wrapper */
-                       plain_files_wrapper = *wrapperpp;
                }
 
                if (!php_stream_allow_url_fopen("file", sizeof("file") - 1) ||

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to