Reorder checks to make more sense.
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,