]> granicus.if.org Git - php/commitdiff
Probable fix for #26534
authorWez Furlong <wez@php.net>
Fri, 5 Dec 2003 20:25:14 +0000 (20:25 +0000)
committerWez Furlong <wez@php.net>
Fri, 5 Dec 2003 20:25:14 +0000 (20:25 +0000)
ext/standard/streamsfuncs.c

index 572aac1cb2befcb92fd4a067d9123ad4229248e2..53338b2b359e053bd8caa743821b67ab8e84ccba 100644 (file)
@@ -444,7 +444,9 @@ PHP_FUNCTION(stream_get_meta_data)
        add_assoc_long(return_value, "unread_bytes", stream->writepos - stream->readpos);
 
        add_assoc_bool(return_value, "seekable", (stream->ops->seek) && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0);
-       add_assoc_string(return_value, "uri", stream->orig_path, 1);
+       if (stream->orig_path) {
+               add_assoc_string(return_value, "uri", stream->orig_path, 1);
+       }
 
        if (!php_stream_populate_meta_data(stream, return_value)) {
                add_assoc_bool(return_value, "timed_out", 0);