]> granicus.if.org Git - php/commitdiff
- Switch back to old severities and still keep bugfix for
authorMarcus Boerger <helly@php.net>
Tue, 30 May 2006 23:10:28 +0000 (23:10 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 30 May 2006 23:10:28 +0000 (23:10 +0000)
  #37632 (Protected method access problem)
# It wasn't really my intention to change the severity. We simply didn't
# have tests for that.

Zend/zend_compile.c

index c9b6c814e9def6460ffc475894107af20c8a9374..ce64719f13d35490223632e2a5b7c2886ec151e5 100644 (file)
@@ -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);
                }