@@ -4422,6 +4422,7 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
4422
4422
{
4423
4423
zend_ast * name_ast = ast -> child [0 ];
4424
4424
zend_ast * args_ast = ast -> child [1 ];
4425
+ bool is_callable_convert = args_ast -> kind == ZEND_AST_CALLABLE_CONVERT ;
4425
4426
4426
4427
znode name_node ;
4427
4428
@@ -4434,7 +4435,8 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
4434
4435
{
4435
4436
bool runtime_resolution = zend_compile_function_name (& name_node , name_ast );
4436
4437
if (runtime_resolution ) {
4437
- if (zend_string_equals_literal_ci (zend_ast_get_str (name_ast ), "assert" )) {
4438
+ if (zend_string_equals_literal_ci (zend_ast_get_str (name_ast ), "assert" )
4439
+ && !is_callable_convert ) {
4438
4440
zend_compile_assert (result , zend_ast_get_list (args_ast ), Z_STR (name_node .u .constant ), NULL );
4439
4441
} else {
4440
4442
zend_compile_ns_call (result , & name_node , args_ast );
@@ -4453,8 +4455,7 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
4453
4455
fbc = zend_hash_find_ptr (CG (function_table ), lcname );
4454
4456
4455
4457
/* Special assert() handling should apply independently of compiler flags. */
4456
- if ((args_ast -> kind != ZEND_AST_CALLABLE_CONVERT ) &&
4457
- fbc && zend_string_equals_literal (lcname , "assert" )) {
4458
+ if (fbc && zend_string_equals_literal (lcname , "assert" ) && !is_callable_convert ) {
4458
4459
zend_compile_assert (result , zend_ast_get_list (args_ast ), lcname , fbc );
4459
4460
zend_string_release (lcname );
4460
4461
zval_ptr_dtor (& name_node .u .constant );
@@ -4471,7 +4472,7 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
4471
4472
return ;
4472
4473
}
4473
4474
4474
- if (( args_ast -> kind != ZEND_AST_CALLABLE_CONVERT ) &&
4475
+ if (! is_callable_convert &&
4475
4476
zend_try_compile_special_func (result , lcname ,
4476
4477
zend_ast_get_list (args_ast ), fbc , type ) == SUCCESS
4477
4478
) {
0 commit comments