diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-10 10:03:43 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-10 10:04:37 +0200 |
| commit | c23edd2acfb30ddfeddedec7198e284a287657eb (patch) | |
| tree | afe4c8690cf370b1ae841caa3a7284bb0489c0c1 /Zend/zend_interfaces.c | |
| parent | 097043db2a0d113f89bd26c6f1d7a976d83951a8 (diff) | |
| download | php-git-c23edd2acfb30ddfeddedec7198e284a287657eb.tar.gz | |
Remove called_scope inheritance in zend_call_method()
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.
Diffstat (limited to 'Zend/zend_interfaces.c')
| -rw-r--r-- | Zend/zend_interfaces.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 2a6d70dc58..52d3a8ee19 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -73,12 +73,7 @@ ZEND_API zval* zend_call_method(zend_object *object, zend_class_entry *obj_ce, z 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); |
