From: Zeev Suraski Date: Wed, 28 Jan 2004 22:27:39 +0000 (+0000) Subject: Tweak checks to detect some additional cases. X-Git-Tag: php-5.0.0b4RC1~249 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d45541b4fb76af3a30582f949a3704de8b4c0e5c;p=php Tweak checks to detect some additional cases. Reorder checks to make more sense. --- 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,