diff options
author | Zeev Suraski <zeev@php.net> | 2004-01-28 22:27:39 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2004-01-28 22:27:39 +0000 |
commit | d45541b4fb76af3a30582f949a3704de8b4c0e5c (patch) | |
tree | b52dbb892fec5a58a784b8df30e19f9efdf6d8f6 | |
parent | 6d10371ec642cbb42d61b9ee82448128c89cdf63 (diff) | |
download | php-git-d45541b4fb76af3a30582f949a3704de8b4c0e5c.tar.gz |
Tweak checks to detect some additional cases.
Reorder checks to make more sense.
-rw-r--r-- | Zend/zend_compile.c | 4 |
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, |