diff options
-rw-r--r-- | Zend/tests/bug71428.1.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/bug71428.3.phpt | 2 | ||||
-rw-r--r-- | Zend/zend_inheritance.c | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/Zend/tests/bug71428.1.phpt b/Zend/tests/bug71428.1.phpt index b754687560..fbf342380f 100644 --- a/Zend/tests/bug71428.1.phpt +++ b/Zend/tests/bug71428.1.phpt @@ -1,5 +1,7 @@ --TEST-- bug #71428.1: inheritance with null default values +--XFAIL-- +This is a BC break --FILE-- <?php class A { diff --git a/Zend/tests/bug71428.3.phpt b/Zend/tests/bug71428.3.phpt index 2f400e5952..65d397052e 100644 --- a/Zend/tests/bug71428.3.phpt +++ b/Zend/tests/bug71428.3.phpt @@ -1,5 +1,7 @@ --TEST-- bug #71428: Validation type inheritance with = NULL +--XFAIL-- +This is a BC break --FILE-- <?php class A { } diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index f376150f40..42283f94dc 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -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) { |