Skip to content

Commit 66031cf

Browse files
committed
Restored old behavior
1 parent c783645 commit 66031cf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Zend/zend_inheritance.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function *
568568
child->common.prototype->common.fn_flags & (ZEND_ACC_ABSTRACT | ZEND_ACC_HAS_RETURN_TYPE)
569569
)) {
570570
if (UNEXPECTED(!zend_do_perform_implementation_check(child, child->common.prototype))) {
571-
zend_string *method_prototype = zend_get_function_declaration(parent);
571+
zend_string *method_prototype = zend_get_function_declaration(child->common.prototype);
572572
zend_string *child_prototype = zend_get_function_declaration(child);
573573
zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s must be compatible with %s", child_prototype->val, method_prototype->val);
574574
}

tests/classes/ctor_in_interface_04.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ class derived extends implem
2323

2424
?>
2525
--EXPECTF--
26-
Fatal error: Declaration of derived::__construct($a) must be compatible with implem::__construct() in %s on line %d
26+
Fatal error: Declaration of derived::__construct($a) must be compatible with constr::__construct() in %s on line %d

0 commit comments

Comments
 (0)