File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1+ --TEST--
2+ Spread operator is not supported in destructuring assignments (only spread)
3+ --FILE--
4+ <?php
5+
6+ [...$ x ] = [1 , 2 , 3 ];
7+
8+ ?>
9+ --EXPECTF--
10+ Fatal error: Spread operator is not supported in assignments in %s on line %d
Original file line number Diff line number Diff line change @@ -2939,8 +2939,9 @@ static bool zend_propagate_list_refs(zend_ast *ast) { /* {{{ */
29392939static bool list_is_keyed (zend_ast_list * list )
29402940{
29412941 for (uint32_t i = 0 ; i < list -> children ; i ++ ) {
2942- if (list -> child [i ]) {
2943- return list -> child [i ]-> child [1 ] != NULL ;
2942+ zend_ast * child = list -> child [i ];
2943+ if (child ) {
2944+ return child -> kind == ZEND_AST_ARRAY_ELEM && child -> child [1 ] != NULL ;
29442945 }
29452946 }
29462947 return false;
You can’t perform that action at this time.
0 commit comments