1
0
mirror of https://github.com/php/php-src.git synced 2026-04-04 22:52:40 +02:00

Fix ct binding for cuf/cufa functions

It was checking against the wrong AST kind, so the binding was
never actually done.
This commit is contained in:
Nikita Popov
2014-09-23 21:02:32 +02:00
parent 9070eb38e9
commit 67a5ca6697

View File

@@ -2646,7 +2646,7 @@ static int zend_try_compile_ct_bound_init_user_func(znode *result, zend_ast *nam
zend_function *fbc;
zend_op *opline;
if (name_ast->kind != ZEND_AST_CONST || Z_TYPE_P(zend_ast_get_zval(name_ast)) != IS_STRING) {
if (name_ast->kind != ZEND_AST_ZVAL || Z_TYPE_P(zend_ast_get_zval(name_ast)) != IS_STRING) {
return FAILURE;
}
@@ -2663,9 +2663,11 @@ static int zend_try_compile_ct_bound_init_user_func(znode *result, zend_ast *nam
}
opline = zend_emit_op(NULL, ZEND_INIT_FCALL, NULL, NULL TSRMLS_CC);
opline->extended_value = num_args;
opline->op2_type = IS_CONST;
LITERAL_STR(opline->op2, lcname);
opline->extended_value = num_args;
zend_alloc_cache_slot(opline->op2.constant TSRMLS_CC);
return SUCCESS;
}