File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class Test
9
9
10
10
public function __construct () {
11
11
if (self ::$ a === null ) {
12
- var_dump (self ::$ a = $ this );
12
+ var_dump (self ::$ a = & $ this );
13
13
} else {
14
14
var_dump (self ::$ a = $ this );
15
15
}
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-10168 (heap-buffer-overflow at zval_undefined_cv): assign typed prop
3
+ --FILE--
4
+ <?php
5
+
6
+ class Foo {}
7
+
8
+ class Test
9
+ {
10
+ static Test |Foo |null $ a = null ;
11
+
12
+ public function __construct () {
13
+ var_dump (self ::$ a = $ this );
14
+ }
15
+
16
+ function __destruct () {
17
+ var_dump (self ::$ a = new Foo ());
18
+ }
19
+ }
20
+ new Test ();
21
+ new Test ();
22
+
23
+ ?>
24
+ --EXPECT--
25
+ object(Test)#1 (0) {
26
+ }
27
+ object(Foo)#3 (0) {
28
+ }
29
+ object(Test)#2 (0) {
30
+ }
31
+ object(Foo)#1 (0) {
32
+ }
You can’t perform that action at this time.
0 commit comments