From: Levi Morrison Date: Thu, 5 May 2016 14:58:05 +0000 (-0600) Subject: Fix bug #71428 X-Git-Tag: php-7.1.0alpha1~99^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56c3d75780b7c2faf290722a615fd2d797d2f041;p=php Fix bug #71428 This also affects bug #72119 --- diff --git a/Zend/tests/bug71428.1.phpt b/Zend/tests/bug71428.1.phpt index 064e8cfa51..e4d3a22f67 100644 --- a/Zend/tests/bug71428.1.phpt +++ b/Zend/tests/bug71428.1.phpt @@ -1,7 +1,5 @@ --TEST-- bug #71428.1: inheritance with null default values ---XFAIL-- -This is a BC break --FILE-- ---EXPECT-- -OK +--EXPECTF-- +Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(?array $baz = NULL) in %s on line %d diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index de9b63e342..879e00375c 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -319,13 +319,11 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c return 0; } -#if 0 // This introduces BC break described at https://bugs.php.net/bug.php?id=72119 if (proto_arg_info->type_hint && proto_arg_info->allow_null && !fe_arg_info->allow_null) { /* incompatible nullability */ return 0; } -#endif /* by-ref constraints on arguments are invariant */ if (fe_arg_info->pass_by_reference != proto_arg_info->pass_by_reference) {