diff options
| author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2012-03-18 18:23:27 +0000 |
|---|---|---|
| committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2012-03-18 18:23:27 +0000 |
| commit | 920072df6561b2e7df29a2860f440f89e701c733 (patch) | |
| tree | 6facda0dcd19e6582aa4600e4616a082f6652d28 /ext/reflection/tests | |
| parent | d870a411186638907a1e6b064a02fbe7afc03f2e (diff) | |
| download | php-git-920072df6561b2e7df29a2860f440f89e701c733.tar.gz | |
- Fixed bug #61388 (ReflectionObject:getProperties() issues invalid reads
when get_properties returns a hash table with (inaccessible) dynamic
numeric properties).
Diffstat (limited to 'ext/reflection/tests')
| -rw-r--r-- | ext/reflection/tests/bug61388.phpt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug61388.phpt b/ext/reflection/tests/bug61388.phpt new file mode 100644 index 0000000000..75c0300151 --- /dev/null +++ b/ext/reflection/tests/bug61388.phpt @@ -0,0 +1,32 @@ +--TEST-- +ReflectionObject:getProperties() issues invalid reads when it get_properties returns a hash table with (inaccessible) dynamic numeric properties +--FILE-- +<?php +$x = new ArrayObject(); +$x[0] = 'test string 2'; +$x['test'] = 'test string 3'; +$reflObj = new ReflectionObject($x); +print_r($reflObj->getProperties(ReflectionProperty::IS_PUBLIC)); + +$x = (object)array("a", "oo" => "b"); +$reflObj = new ReflectionObject($x); +print_r($reflObj->getProperties(ReflectionProperty::IS_PUBLIC)); +--EXPECT-- +Array +( + [0] => ReflectionProperty Object + ( + [name] => test + [class] => ArrayObject + ) + +) +Array +( + [0] => ReflectionProperty Object + ( + [name] => oo + [class] => stdClass + ) + +) |
