]> granicus.if.org Git - php/commitdiff
Restored old behavior
authorDmitry Stogov <dmitry@zend.com>
Mon, 29 Jun 2015 11:10:46 +0000 (14:10 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 29 Jun 2015 11:10:46 +0000 (14:10 +0300)
Zend/zend_inheritance.c
tests/classes/ctor_in_interface_04.phpt

index 1559d02047b753de07172601aa4deb603ad088f7..004aadde34be649a01f6e0ee9c21a68571cfa3ff 100644 (file)
@@ -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);
                }
index b9f792415aa700661466cc6136bf19d313a84f8c..0b07f9a1ca1c8ceeed88d275ac360d5927f70db7 100644 (file)
@@ -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