diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-15 10:59:32 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-15 10:59:32 +0200 |
| commit | 9a1a94e9b9195adf92dbafd681c3b9cf0fc59f07 (patch) | |
| tree | b369d976ff8d14e99a0f5c819a2786d7983239c8 /ext/reflection | |
| parent | f60cf0cfe7fd335718ba5c24bbd824f157e9ea49 (diff) | |
| parent | ee7c7a8e26b99e3b25a7d41abfe1a2c37b3f6968 (diff) | |
| download | php-git-9a1a94e9b9195adf92dbafd681c3b9cf0fc59f07.tar.gz | |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #79820
Diffstat (limited to 'ext/reflection')
| -rw-r--r-- | ext/reflection/tests/bug79820.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug79820.phpt b/ext/reflection/tests/bug79820.phpt new file mode 100644 index 0000000000..ff81f0e738 --- /dev/null +++ b/ext/reflection/tests/bug79820.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #79820: Use after free when type duplicated into ReflectionProperty gets resolved +--FILE-- +<?php + +class Test { + public stdClass $prop; +} + +$rp = new ReflectionProperty(Test::class, 'prop'); +$test = new Test; +$test->prop = new stdClass; +var_dump($rp->getType()->getName()); +$test->dynProp = 42; + +$rp = new ReflectionProperty($test, 'dynProp'); +var_dump($rp->getType()); + +?> +--EXPECT-- +string(8) "stdClass" +NULL |
