From: Marcus Boerger Date: Tue, 30 May 2006 23:10:28 +0000 (+0000) Subject: - Switch back to old severities and still keep bugfix for X-Git-Tag: php-5.2.0RC1~409 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d87de86823208b9bedc1a456001b0c7916074a0d;p=php - Switch back to old severities and still keep bugfix for #37632 (Protected method access problem) # It wasn't really my intention to change the severity. We simply didn't # have tests for that. --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index c9b6c814e9..ce64719f13 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2028,12 +2028,12 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f if (parent_flags & ZEND_ACC_ABSTRACT) { child->common.fn_flags |= ZEND_ACC_IMPLEMENTED_ABSTRACT; child->common.prototype = parent; - } else if (!(parent->common.fn_flags & ZEND_ACC_CTOR) || (parent->common.prototype && parent->common.prototype->common.scope->ce_flags && ZEND_ACC_INTERFACE)) { + } else if (!(parent->common.fn_flags & ZEND_ACC_CTOR) || (parent->common.prototype && (parent->common.prototype->common.scope->ce_flags & ZEND_ACC_INTERFACE))) { /* ctors only have a prototype if it comes from an interface */ child->common.prototype = parent->common.prototype ? parent->common.prototype : parent; } - if (child->common.prototype) { + if (child->common.prototype && (child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT)) { if (!zend_do_perform_implementation_check(child, child->common.prototype)) { zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name); }