com php-src: Restored old behavior: Zend/zend_inheritance.c tests/classes/ctor_in_interface_04.phpt
| From: | Dmitry Stogov | Date: | Mon, 29 Jun 2015 11:10:46 +0000 |
| Subject: | com php-src: Restored old behavior: Zend/zend_inheritance.c tests/classes/ctor_in_interface_04.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87620@lists.php.net to get a copy of this message | ||
Commit: 66031cfe199937c6b6e531793a6c655a81da92c4
Author: Dmitry Stogov <dmitry@zend.com> Mon, 29 Jun 2015 14:10:46 +0300
Parents: c783645b99f35da3735977a05c9b7d0da372ce6b
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=66031cfe199937c6b6e531793a6c655a81da92c4
Log:
Restored old behavior
Changed paths:
M Zend/zend_inheritance.c
M tests/classes/ctor_in_interface_04..phpt
Diff:
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index 1559d02..004aadd 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 b9f7924..0b07f9a 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