From d45541b4fb76af3a30582f949a3704de8b4c0e5c Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Wed, 28 Jan 2004 22:27:39 +0000 Subject: [PATCH] Tweak checks to detect some additional cases. Reorder checks to make more sense. --- Zend/zend_compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index ee1afa651c..9387733f49 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1733,8 +1733,8 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f return 1; /* method doesn't exist in child, copy from parent */ } - if (parent->common.scope != child->common.scope - && parent->common.fn_flags & ZEND_ACC_ABSTRACT + if (parent->common.fn_flags & ZEND_ACC_ABSTRACT + && parent->common.scope != (child->common.prototype ? child->common.prototype->common.scope : child->common.scope) && child->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_IMPLEMENTED_ABSTRACT)) { zend_error(E_COMPILE_ERROR, "Can't inherit abstract function %s::%s() (previously declared abstract in %s)", parent->common.scope->name, -- 2.50.1