summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 02507f2366..1d544c6561 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -2819,6 +2819,10 @@ static void zend_compile_keyed_list_assign(zend_ast_list *list, znode *expr_node
zend_error(E_COMPILE_ERROR, "[] and list() assignments cannot be by reference");
}
+ if (key_ast == NULL) {
+ zend_error(E_COMPILE_ERROR, "Cannot mix keyed and unkeyed array entries in assignments");
+ }
+
zend_compile_expr(&dim_node, key_ast);
if (expr_node->op_type == IS_CONST) {
@@ -2829,10 +2833,6 @@ static void zend_compile_keyed_list_assign(zend_ast_list *list, znode *expr_node
zend_error(E_COMPILE_ERROR, "Cannot use empty array entries in keyed array");
}
- if (key_ast == NULL) {
- zend_error(E_COMPILE_ERROR, "Cannot mix keyed and unkeyed array entries in assignments");
- }
-
zend_verify_list_assign_target(var_ast, old_style);
zend_emit_op(&fetch_result, ZEND_FETCH_LIST, expr_node, &dim_node);