From: Dmitry Stogov Date: Mon, 29 Jun 2015 11:10:46 +0000 (+0300) Subject: Restored old behavior X-Git-Tag: php-7.1.0alpha3~25^2~113 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66031cfe199937c6b6e531793a6c655a81da92c4;p=php Restored old behavior --- 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