Skip to content

Commit 9a1a94e

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fixed bug #79820
2 parents f60cf0c + ee7c7a8 commit 9a1a94e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

ext/reflection/tests/bug79820.phpt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--TEST--
2+
Bug #79820: Use after free when type duplicated into ReflectionProperty gets resolved
3+
--FILE--
4+
<?php
5+
6+
class Test {
7+
public stdClass $prop;
8+
}
9+
10+
$rp = new ReflectionProperty(Test::class, 'prop');
11+
$test = new Test;
12+
$test->prop = new stdClass;
13+
var_dump($rp->getType()->getName());
14+
$test->dynProp = 42;
15+
16+
$rp = new ReflectionProperty($test, 'dynProp');
17+
var_dump($rp->getType());
18+
19+
?>
20+
--EXPECT--
21+
string(8) "stdClass"
22+
NULL

0 commit comments

Comments
 (0)