Similar to
097043db2a0d113f89bd26c6f1d7a976d83951a8, 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.
if (object) {
called_scope = object->ce;
} else {
- called_scope = zend_get_called_scope(EG(current_execute_data));
- if (obj_ce &&
- (!called_scope ||
- !instanceof_function(called_scope, obj_ce))) {
- called_scope = obj_ce;
- }
+ called_scope = obj_ce;
}
zend_call_known_function(fn, object, called_scope, retval_ptr, param_count, params);