summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2004-01-28 22:27:39 +0000
committerZeev Suraski <zeev@php.net>2004-01-28 22:27:39 +0000
commitd45541b4fb76af3a30582f949a3704de8b4c0e5c (patch)
treeb52dbb892fec5a58a784b8df30e19f9efdf6d8f6
parent6d10371ec642cbb42d61b9ee82448128c89cdf63 (diff)
downloadphp-git-d45541b4fb76af3a30582f949a3704de8b4c0e5c.tar.gz
Tweak checks to detect some additional cases.
Reorder checks to make more sense.
-rw-r--r--Zend/zend_compile.c4
1 files 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,