summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2016-04-29 11:15:26 +0300
committerDmitry Stogov <dmitry@zend.com>2016-04-29 11:15:26 +0300
commit19c0335609ac9a84eaec048ffb7fdcf1312689cd (patch)
treeb1c28fca2d5272f09c451519b0208404a06ea141
parent2f17ef1d25988d8a0a642d262c8dc92d0f205b3c (diff)
downloadphp-git-19c0335609ac9a84eaec048ffb7fdcf1312689cd.tar.gz
Revert "Fix bad merge into master"
This reverts commit 2c8e4ba8f1f63429f5d0e08a4a0fc6d449ca801a.
-rw-r--r--NEWS1
-rw-r--r--Zend/tests/bug71428.1.phpt2
-rw-r--r--Zend/tests/bug71428.3.phpt2
-rw-r--r--Zend/tests/bug72119.phpt4
-rw-r--r--Zend/zend_inheritance.c3
5 files changed, 9 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 6208e65640..b8a0d86003 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,6 @@ PHP NEWS
. Fixed bug #62814 (It is possible to stiffen child class members visibility).
(Nikita)
. Fixed bug #69989 (Generators don't participate in cycle GC). (Nikita)
- . Fixed bug #71428 (Inheritance and allow_null). (Joe)
. Fixed bug #71572 (String offset assignment from an empty string inserts
null byte). (Francois)
. Implemented the RFC `Support Class Constant Visibility`. (Sean DuBois,
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/tests/bug72119.phpt b/Zend/tests/bug72119.phpt
index 71d3a59d6f..b8f070a25a 100644
--- a/Zend/tests/bug72119.phpt
+++ b/Zend/tests/bug72119.phpt
@@ -14,5 +14,5 @@ class Hello implements Foo {
}
echo "OK\n";
?>
---EXPECTF--
-Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(array $baz = NULL) in %s on line %d
+--EXPECT--
+OK
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) {