Fixes bug #72496.
- Core:
. Fix bug #71936 (Segmentation fault destroying HTTP_RAW_POST_DATA).
(mike dot laspina at gmail dot com, Remi)
+ . Fix bug #72496 (Cannot declare public method with signature incompatible
+ with parent private method). (Pedro Magalhães)
- bz2:
. Fix bug #72447 (Type Confusion in php_bz2_filter_create()). (gogil at
--- /dev/null
+--TEST--
+Bug #72496 (declare public method with signature incompatible with parent private method should not throw a warning)
+--FILE--
+<?php
+class Foo
+{
+ private function getFoo()
+ {
+ return 'Foo';
+ }
+
+ private function getBar()
+ {
+ return 'Bar';
+ }
+
+ private function getBaz()
+ {
+ return 'Baz';
+ }
+}
+
+class Bar extends Foo
+{
+ public function getFoo($extraArgument)
+ {
+ return $extraArgument;
+ }
+
+ protected function getBar($extraArgument)
+ {
+ return $extraArgument;
+ }
+
+ private function getBaz($extraArgument)
+ {
+ return $extraArgument;
+ }
+}
+
+echo "OK\n";
+--EXPECT--
+OK
return 1;
}
- /* If both methods are private do not enforce a signature */
- if ((fe->common.fn_flags & ZEND_ACC_PRIVATE) && (proto->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ /* If the prototype method is private do not enforce a signature */
+ if (proto->common.fn_flags & ZEND_ACC_PRIVATE) {
return 1;
}