Skip to content

Commit 6ee4bad

Browse files
committed
fixup! Preserve the original AST for closures in const-expressions
1 parent ad06e0c commit 6ee4bad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/opcache/zend_file_cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ static void zend_file_cache_serialize_ast(zend_ast *ast,
365365
}
366366
} else if (ast->kind == ZEND_AST_OP_ARRAY) {
367367
/* The op_array itself will be serialized as part of the dynamic_func_defs. */
368-
SERIALIZE_PTR(((zend_ast_op_array*)ast)->op_array);
368+
SERIALIZE_PTR(zend_ast_get_op_array(ast)->op_array);
369369
} else if (zend_ast_is_decl(ast)) {
370370
/* Not implemented. */
371371
ZEND_UNREACHABLE();
@@ -1250,7 +1250,7 @@ static void zend_file_cache_unserialize_ast(zend_ast *ast,
12501250
}
12511251
} else if (ast->kind == ZEND_AST_OP_ARRAY) {
12521252
/* The op_array itself will be unserialized as part of the dynamic_func_defs. */
1253-
UNSERIALIZE_PTR(((zend_ast_op_array*)ast)->op_array);
1253+
UNSERIALIZE_PTR(zend_ast_get_op_array(ast)->op_array);
12541254
} else if (zend_ast_is_decl(ast)) {
12551255
/* Not implemented. */
12561256
ZEND_UNREACHABLE();

0 commit comments

Comments
 (0)