From 66031cfe199937c6b6e531793a6c655a81da92c4 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 29 Jun 2015 14:10:46 +0300 Subject: [PATCH] Restored old behavior --- Zend/zend_inheritance.c | 2 +- tests/classes/ctor_in_interface_04.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 1559d02047..004aadde34 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -568,7 +568,7 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function * child->common.prototype->common.fn_flags & (ZEND_ACC_ABSTRACT | ZEND_ACC_HAS_RETURN_TYPE) )) { if (UNEXPECTED(!zend_do_perform_implementation_check(child, child->common.prototype))) { - zend_string *method_prototype = zend_get_function_declaration(parent); + zend_string *method_prototype = zend_get_function_declaration(child->common.prototype); zend_string *child_prototype = zend_get_function_declaration(child); zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s must be compatible with %s", child_prototype->val, method_prototype->val); } diff --git a/tests/classes/ctor_in_interface_04.phpt b/tests/classes/ctor_in_interface_04.phpt index b9f792415a..0b07f9a1ca 100644 --- a/tests/classes/ctor_in_interface_04.phpt +++ b/tests/classes/ctor_in_interface_04.phpt @@ -23,4 +23,4 @@ class derived extends implem ?> --EXPECTF-- -Fatal error: Declaration of derived::__construct($a) must be compatible with implem::__construct() in %s on line %d +Fatal error: Declaration of derived::__construct($a) must be compatible with constr::__construct() in %s on line %d -- 2.40.0