Skip to content

Commit 43dc616

Browse files
committed
Move closure_may_use_this assignment
1 parent dd413a3 commit 43dc616

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4044,6 +4044,7 @@ static void zend_compile_dynamic_call(znode *result, znode *name_node, zend_ast
40444044
opline->result.num = zend_alloc_cache_slot();
40454045
}
40464046
} else {
4047+
CG(context).closure_may_use_this = true;
40474048
zend_emit_op(NULL, ZEND_INIT_DYNAMIC_CALL, NULL, name_node);
40484049
}
40494050

@@ -5342,7 +5343,6 @@ static void zend_compile_call(znode *result, const zend_ast *ast, uint32_t type)
53425343
if (name_ast->kind != ZEND_AST_ZVAL || Z_TYPE_P(zend_ast_get_zval(name_ast)) != IS_STRING) {
53435344
zend_compile_expr(&name_node, name_ast);
53445345
zend_compile_dynamic_call(result, &name_node, args_ast, ast->lineno);
5345-
CG(context).closure_may_use_this = true;
53465346
return;
53475347
}
53485348

0 commit comments

Comments
 (0)