diff options
| author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2011-02-01 22:55:17 +0000 |
|---|---|---|
| committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2011-02-01 22:55:17 +0000 |
| commit | 1f4990299927a9fdf24676ebbd1c7f6729aa3838 (patch) | |
| tree | be5c38b49121b8fe057183d186ab1615ee4e01c2 /ext | |
| parent | 01745fa657a9b3f8a8f79520a87c265ec3725792 (diff) | |
| download | php-git-1f4990299927a9fdf24676ebbd1c7f6729aa3838.tar.gz | |
- Fixed bug #53903 (userspace stream stat callback does not separate the
elements of the returned array before converting them).
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/standard/tests/streams/bug53903.phpt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ext/standard/tests/streams/bug53903.phpt b/ext/standard/tests/streams/bug53903.phpt new file mode 100644 index 0000000000..3b61635d78 --- /dev/null +++ b/ext/standard/tests/streams/bug53903.phpt @@ -0,0 +1,32 @@ +--TEST-- +Bug #53903 streamwrapper/stream_stat causes problems +--FILE-- +<?php + +class sw { + + public function stream_open($path, $mode, $options, &$opened_path) { + return true; + } + + public function stream_stat() { + return array( + 'atime' => $this->undefined, + ); + } + +} +stream_wrapper_register('sx', 'sw') or die('failed'); + +fstat(fopen('sx://test', 'r')); + +$s[] = 1; // Cannot use a scalar value as an array + +print_r($s); +--EXPECTF-- +Notice: Undefined property: sw::$undefined in %s on line %d +Array +( + [0] => 1 +) + |
