File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -351,9 +351,11 @@ ZEND_API zend_ast *zend_ast_copy(zend_ast *ast)
351
351
zend_ast * new = emalloc (sizeof (zend_ast ) + sizeof (zend_ast * ) * (ast -> children - 1 ));
352
352
int i ;
353
353
new -> kind = ast -> kind ;
354
+ new -> children = ast -> children ;
354
355
for (i = 0 ; i < ast -> children ; i ++ ) {
355
356
(& new -> u .child )[i ] = zend_ast_copy ((& ast -> u .child )[i ]);
356
357
}
358
+ return new ;
357
359
}
358
360
return zend_ast_create_dynamic (ast -> kind );
359
361
}
Original file line number Diff line number Diff line change 2
2
Error case: class constant as an array
3
3
--FILE--
4
4
<?php
5
- class myclass
6
- {
7
- const myConst = array ();
8
- }
5
+ class myclass
6
+ {
7
+ const myConst = array ();
8
+ }
9
9
?>
10
+ ===DONE===
10
11
--EXPECTF--
11
-
12
- Fatal error: Arrays are not allowed in class constants in %s on line 4
12
+ ===DONE===
You can’t perform that action at this time.
0 commit comments