]> granicus.if.org Git - php/commitdiff
Fixed BC break described by bug #72119.
authorDmitry Stogov <dmitry@zend.com>
Thu, 28 Apr 2016 16:56:10 +0000 (19:56 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 28 Apr 2016 16:56:10 +0000 (19:56 +0300)
It was introduced after 7.0.5 release by attempt to fix bug #71428.

Zend/tests/bug71428.1.phpt
Zend/tests/bug71428.3.phpt
Zend/zend_inheritance.c

index b754687560a62ad791297fafa413a306f7d4cd29..fbf342380ffedc745495addfb2a6a9bd3649217e 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 bug #71428.1: inheritance with null default values
+--XFAIL--
+This is a BC break
 --FILE--
 <?php
 class A {
index 2f400e5952e5819a3ca2c87a2d1af2ad952759c5..65d397052e4312501984a85a8e593c87e7857456 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 bug #71428: Validation type inheritance with = NULL
+--XFAIL--
+This is a BC break
 --FILE--
 <?php
 class A { }
index 1575293b0adcdba51cc3ad974b07bdc1b498c8d3..845500c041b971705838993ec32c8a873a7b97a0 100644 (file)
@@ -319,10 +319,13 @@ 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) {