Skip to content

Commit baa2858

Browse files
committed
Fix variable type
This is no longer a boolean.
1 parent 9b33272 commit baa2858

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Zend/zend_compile.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2754,12 +2754,12 @@ zend_op *zend_compile_static_prop(znode *result, zend_ast *ast, uint32_t type, i
27542754
}
27552755
/* }}} */
27562756

2757-
static void zend_verify_list_assign_target(zend_ast *var_ast, zend_bool old_style) /* {{{ */ {
2757+
static void zend_verify_list_assign_target(zend_ast *var_ast, zend_ast_attr array_style) /* {{{ */ {
27582758
if (var_ast->kind == ZEND_AST_ARRAY) {
27592759
if (var_ast->attr == ZEND_ARRAY_SYNTAX_LONG) {
27602760
zend_error_noreturn(E_COMPILE_ERROR, "Cannot assign to array(), use [] instead");
27612761
}
2762-
if (old_style != var_ast->attr) {
2762+
if (array_style != var_ast->attr) {
27632763
zend_error_noreturn(E_COMPILE_ERROR, "Cannot mix [] and list()");
27642764
}
27652765
} else if (!zend_can_write_to_variable(var_ast)) {
@@ -2793,7 +2793,7 @@ static zend_bool zend_propagate_list_refs(zend_ast *ast) { /* {{{ */
27932793
/* }}} */
27942794

27952795
static void zend_compile_list_assign(
2796-
znode *result, zend_ast *ast, znode *expr_node, zend_bool old_style) /* {{{ */
2796+
znode *result, zend_ast *ast, znode *expr_node, zend_ast_attr array_style) /* {{{ */
27972797
{
27982798
zend_ast_list *list = zend_ast_get_list(ast);
27992799
uint32_t i;
@@ -2850,7 +2850,7 @@ static void zend_compile_list_assign(
28502850
Z_TRY_ADDREF(expr_node->u.constant);
28512851
}
28522852

2853-
zend_verify_list_assign_target(var_ast, old_style);
2853+
zend_verify_list_assign_target(var_ast, array_style);
28542854

28552855
opline = zend_emit_op(&fetch_result,
28562856
elem_ast->attr ? (expr_node->op_type == IS_CV ? ZEND_FETCH_DIM_W : ZEND_FETCH_LIST_W) : ZEND_FETCH_LIST_R, expr_node, &dim_node);

0 commit comments

Comments
 (0)