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

index 501405818077e88260678a1b58d36e944cfccfb9..456e6579a8eb3ebbd0e73dbb732c42fe310b188d 100644 (file)
@@ -1364,7 +1364,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)