diff options
author | Joe Watkins <krakjoe@php.net> | 2017-02-01 18:33:58 +0000 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2017-02-01 18:34:14 +0000 |
commit | 46de334452683953425b25fc0451649eaa6059fe (patch) | |
tree | aa6bc16e43d1ae1c428fcf7d6592e82e36622dd2 /Zend/zend_inheritance.c | |
parent | 648238da5c45bdf2c65d856b533f9a2534864ba2 (diff) | |
download | php-git-46de334452683953425b25fc0451649eaa6059fe.tar.gz |
Revert "Inheritance checks should not ignore parents if these implement an interface"
This reverts commit b67eb3440bb244adf6957bf2c68aeeaa6efc8c8d.
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r-- | Zend/zend_inheritance.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 8ad5cc2e01..fd1345f844 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -607,12 +607,13 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function * } else if (!(parent->common.fn_flags & ZEND_ACC_CTOR) || (parent->common.prototype && (parent->common.prototype->common.scope->ce_flags & ZEND_ACC_INTERFACE))) { /* ctors only have a prototype if it comes from an interface */ child->common.prototype = parent->common.prototype ? parent->common.prototype : parent; - /* and if that is the case, we want to check inheritance against it */ - if (parent->common.fn_flags & ZEND_ACC_CTOR) { - parent = child->common.prototype; - } } + if (child->common.prototype && ( + child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT + )) { + parent = child->common.prototype; + } if (UNEXPECTED(!zend_do_perform_implementation_check(child, parent))) { int error_level; const char *error_verb; |