]> granicus.if.org Git - php/commitdiff
Fixed bug #43216 (stream_is_local() returns false on "file://")
authorDmitry Stogov <dmitry@php.net>
Fri, 9 Nov 2007 09:37:42 +0000 (09:37 +0000)
committerDmitry Stogov <dmitry@php.net>
Fri, 9 Nov 2007 09:37:42 +0000 (09:37 +0000)
NEWS
ext/standard/streamsfuncs.c
ext/standard/tests/file/bug43216.phpt [new file with mode: 0755]

diff --git a/NEWS b/NEWS
index f3fa057c25f4c29ba220692ac79bd7ab2cf0418a..9e1132ce3df369e353e942e09f73816b7dc6b9d9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2008, PHP 5.2.6
+- Fixed bug #43216 (stream_is_local() returns false on "file://"). (Dmitry)
 - Fixed bug #43201 (Crash on using unitialized vals and __get/__set). (Dmitry)
 - Fixed bug #43175 (__destruct() throwing an exception with __call() causes
   segfault). (Dmitry)
index 963cecc0fb3d5cb3f3e241879e11176ab39d57aa..79db8ff53518eba56d027479e7e7faa86ae3687c 100644 (file)
@@ -1361,7 +1361,7 @@ PHP_FUNCTION(stream_is_local)
                wrapper = stream->wrapper;
        } else {
                convert_to_string_ex(&zstream);
-               wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), NULL, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC);
+               wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), NULL, 0 TSRMLS_CC);
        }
 
        if(!wrapper) {
diff --git a/ext/standard/tests/file/bug43216.phpt b/ext/standard/tests/file/bug43216.phpt
new file mode 100755 (executable)
index 0000000..111f160
--- /dev/null
@@ -0,0 +1,8 @@
+--TEST--
+Bug #43216 (stream_is_local() returns false on file://)
+--FILE--
+<?
+var_dump(stream_is_local("file://"));
+?>
+--EXPECT--
+bool(true)