summaryrefslogtreecommitdiff
path: root/Zend/zend_inheritance.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-05-08 11:38:03 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-05-08 11:38:03 +0200
commitd5ef9c5b289a31e1c3618916607ca3f68e06f9c0 (patch)
treec53579653c67943e5e66663bf2b06b0bbcc5cf04 /Zend/zend_inheritance.c
parent72e1da81b6792d4141b4b41f6fc3e92b68aa0f3e (diff)
parente2ef4e9e2fa8cdb749ce4c2afdd3499765ffb721 (diff)
downloadphp-git-d5ef9c5b289a31e1c3618916607ca3f68e06f9c0.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r--Zend/zend_inheritance.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index 0916d91f77..006dce3882 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -195,8 +195,8 @@ static int zend_do_perform_type_hint_check(const zend_function *fe, zend_arg_inf
fe_class_name = ZEND_TYPE_NAME(fe_arg_info->type);
class_name = ZSTR_VAL(fe_class_name);
class_name_len = ZSTR_LEN(fe_class_name);
- if (class_name_len == sizeof("parent")-1 && !strcasecmp(class_name, "parent") && proto->common.scope) {
- fe_class_name = zend_string_copy(proto->common.scope->name);
+ if (class_name_len == sizeof("parent")-1 && !strcasecmp(class_name, "parent") && fe->common.scope && fe->common.scope->parent) {
+ fe_class_name = zend_string_copy(fe->common.scope->parent->name);
} else if (class_name_len == sizeof("self")-1 && !strcasecmp(class_name, "self") && fe->common.scope) {
fe_class_name = zend_string_copy(fe->common.scope->name);
} else {