From b391a7a3723e85202db927bc93b98e3f2f4f0039 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 14 Nov 2002 10:52:45 +0000 Subject: [PATCH] - Fixed bug #20424 (stream_get_meta_data craches on a normal file stream). (Derick, Wez) --- NEWS | 2 ++ ext/standard/tests/file/bug20424.phpt | 12 ++++++++++++ main/streams.c | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ext/standard/tests/file/bug20424.phpt 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 = { -- 2.50.1