Index: Zend/zend_compile.c =================================================================== RCS file: /repository/ZendEngine2/zend_compile.c,v retrieving revision 1.547 diff -u -r1.547 zend_compile.c --- Zend/zend_compile.c 25 Feb 2004 17:23:50 -0000 1.547 +++ Zend/zend_compile.c 25 Feb 2004 23:23:42 -0000 @@ -1733,7 +1733,7 @@ return 0; } - for (i=0; i < proto->common.num_args; i++) { + for (i = 0; i < proto->common.num_args; i++) { if (ZEND_LOG_XOR(fe->common.arg_info[i].class_name, proto->common.arg_info[i].class_name)) { /* Only one has a type hint and the other one doesn't */ return 0; @@ -1828,8 +1828,11 @@ } } - if (!zend_do_perform_implementation_check(child)) { - 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); + /* Perform implementation check when implementing an interface */ + if (child->common.prototype->common.scope->ce_flags & ZEND_ACC_INTERFACE) { + if (!zend_do_perform_implementation_check(child)) { + 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); + } } return 0;