Skip to content

Commit c23edd2

Browse files
committed
Remove called_scope inheritance in zend_call_method()
Similar to 097043d, but for the zend_call_method() API. I don't think we ever use this for static methods, but this logic shouldn't be there. If you want to inherit the active LSB scope for some reason, do so explicitly.
1 parent 097043d commit c23edd2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Zend/zend_interfaces.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,7 @@ ZEND_API zval* zend_call_method(zend_object *object, zend_class_entry *obj_ce, z
7373
if (object) {
7474
called_scope = object->ce;
7575
} else {
76-
called_scope = zend_get_called_scope(EG(current_execute_data));
77-
if (obj_ce &&
78-
(!called_scope ||
79-
!instanceof_function(called_scope, obj_ce))) {
80-
called_scope = obj_ce;
81-
}
76+
called_scope = obj_ce;
8277
}
8378

8479
zend_call_known_function(fn, object, called_scope, retval_ptr, param_count, params);

0 commit comments

Comments
 (0)