Re: com php-src: Fix bad merge into master: NEWS Zend/tests/bug71428.1.phpt Zend/tests/bug71428.3.phpt Zend/tests/bug72119.phpt
Zend/zend_inheritance.c
| From: | Dmitry Stogov | Date: | Fri, 29 Apr 2016 08:17:13 +0000 |
| Subject: | Re: com php-src: Fix bad merge into master: NEWS Zend/tests/bug71428.1.phpt Zend/tests/bug71428.3.phpt Zend/tests/bug72119.phpt Zend/zend_inheritance.c |
||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-91939@lists.php.net to get a copy of this message | ||
This was not a bad merge.
This was a fix of "unintended" BC break.
Reverted.
________________________________________
From: Bob Weinand <bwoebi@php.net>
Sent: Thursday, April 28, 2016 8:32:14 PM
To: php-cvs@lists.php.net
Subject: [PHP-CVS] com php-src: Fix bad merge into master: NEWS Zend/tests/bug71428.1.phpt
Zend/tests/bug71428.3.phpt Zend/tests/bug72119.phpt Zend/zend_inheritance.c
Commit: 2c8e4ba8f1f63429f5d0e08a4a0fc6d449ca801a
Author: Bob Weinand <bobwei9@hotmail.com> Thu, 28 Apr 2016 19:32:14 +0200
Parents: 357ee4305ea75e40991590d2d3425689f5defb68
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2c8e4ba8f1f63429f5d0e08a4a0fc6d449ca801a
Log:
Fix bad merge into master
This should only have been reverted in 7.0, but not for 7.1. (merge=ours??)
Added appropriate NEWS entry.
Changed paths:
M NEWS
M Zend/tests/bug71428.1.phpt
M Zend/tests/bug71428.3.phpt
M Zend/tests/bug72119.phpt
M Zend/zend_inheritance.c
Diff:
diff --git a/NEWS b/NEWS
index b8a0d86..6208e65 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ 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 fbf3423..b754687 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--
<?php
class A {
diff --git a/Zend/tests/bug71428.3.phpt b/Zend/tests/bug71428.3.phpt
index 65d3970..2f400e5 100644
--- a/Zend/tests/bug71428.3.phpt
+++ b/Zend/tests/bug71428.3.phpt
@@ -1,7 +1,5 @@
--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 b8f070a..71d3a59 100644
--- a/Zend/tests/bug72119.phpt
+++ b/Zend/tests/bug72119.phpt
@@ -14,5 +14,5 @@ class Hello implements Foo {
}
echo "OK\n";
?>
---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 42283f9..f376150 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -319,13 +319,10 @@ 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) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php