From: Derick Rethans Date: Thu, 14 Nov 2002 10:52:45 +0000 (+0000) Subject: - Fixed bug #20424 (stream_get_meta_data craches on a normal file stream). X-Git-Tag: php-4.3.0RC1~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b391a7a3723e85202db927bc93b98e3f2f4f0039;p=php - Fixed bug #20424 (stream_get_meta_data craches on a normal file stream). (Derick, Wez) --- diff --git a/NEWS b/NEWS index 8f0e2e418b..1fa1843068 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ PHP 4 NEWS - Moved extensions to PECL (http://pear.php.net/): (James, Derick) . ext/vpopmail . ext/cybermut +- Fixed bug #20424 (stream_get_meta_data craches on a normal file stream). + (Derick, Wez) - Added "neutral" language entry to mbstring spec. (Moriyoshi) - Modified log() to accept multiple bases. (Jason) - Added gd_info() which returns an array of gd support information. (Marcus) diff --git a/ext/standard/tests/file/bug20424.phpt b/ext/standard/tests/file/bug20424.phpt new file mode 100644 index 0000000000..0352d46f8e --- /dev/null +++ b/ext/standard/tests/file/bug20424.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #20424: stream_get_meta_data craches on a normal file stream +--POST-- +--GET-- +--FILE-- + +--EXPECT-- +I'm alive! diff --git a/main/streams.c b/main/streams.c index 1a27c7c4db..f6190498c4 100755 --- a/main/streams.c +++ b/main/streams.c @@ -2029,7 +2029,8 @@ static php_stream_wrapper_ops php_plain_files_wrapper_ops = { NULL, NULL, php_plain_files_url_stater, - php_plain_files_dir_opener + php_plain_files_dir_opener, + "plainfile" }; static php_stream_wrapper php_plain_files_wrapper = {