@@ -4016,27 +4016,29 @@ static zend_never_inline zend_execute_data *zend_init_dynamic_call_object(zend_o
4016
4016
void * object_or_called_scope ;
4017
4017
zend_class_entry * called_scope ;
4018
4018
zend_object * object ;
4019
- uint32_t call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC ;
4019
+ uint32_t call_info ;
4020
4020
4021
4021
if (EXPECTED (function -> handlers -> get_closure ) &&
4022
4022
EXPECTED (function -> handlers -> get_closure (function , & called_scope , & fbc , & object , 0 ) == SUCCESS )) {
4023
4023
4024
- object_or_called_scope = called_scope ;
4025
- if (fbc -> common .fn_flags & ZEND_ACC_CLOSURE ) {
4024
+ object_or_called_scope = called_scope ;
4025
+ if (EXPECTED ( fbc -> common .fn_flags & ZEND_ACC_CLOSURE ) ) {
4026
4026
/* Delay closure destruction until its invocation */
4027
4027
GC_ADDREF (ZEND_CLOSURE_OBJECT (fbc ));
4028
- call_info |= ZEND_CALL_CLOSURE ;
4029
- if (fbc -> common .fn_flags & ZEND_ACC_FAKE_CLOSURE ) {
4030
- call_info |= ZEND_CALL_FAKE_CLOSURE ;
4031
- }
4028
+ ZEND_ASSERT (ZEND_ACC_FAKE_CLOSURE == ZEND_CALL_FAKE_CLOSURE );
4029
+ call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC | ZEND_CALL_CLOSURE |
4030
+ (fbc -> common .fn_flags & ZEND_ACC_FAKE_CLOSURE );
4032
4031
if (object ) {
4033
4032
call_info |= ZEND_CALL_HAS_THIS ;
4034
4033
object_or_called_scope = object ;
4035
4034
}
4036
- } else if (object ) {
4037
- call_info |= ZEND_CALL_RELEASE_THIS | ZEND_CALL_HAS_THIS ;
4038
- GC_ADDREF (object ); /* For $this pointer */
4039
- object_or_called_scope = object ;
4035
+ } else {
4036
+ call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC ;
4037
+ if (object ) {
4038
+ call_info |= ZEND_CALL_RELEASE_THIS | ZEND_CALL_HAS_THIS ;
4039
+ GC_ADDREF (object ); /* For $this pointer */
4040
+ object_or_called_scope = object ;
4041
+ }
4040
4042
}
4041
4043
} else {
4042
4044
zend_throw_error (NULL , "Object of type %s is not callable" , ZSTR_VAL (function -> ce -> name ));
0 commit comments