Bug #74404 [Opn->Csd]: Wrong reflection on DateTimeZone::getTransitions
| From: | krakjoe@php.net | Date: | Mon, 10 Apr 2017 11:50:51 +0000 |
| Subject: | Bug #74404 [Opn->Csd]: Wrong reflection on DateTimeZone::getTransitions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-208433@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74404&edit=1
ID: 74404
Updated by: krakjoe@php.net
Reported by: fabien dot villepinte at gmail dot com
Summary: Wrong reflection on DateTimeZone::getTransitions
-Status: Open
+Status: Closed
Type: Bug
Package: Date/time related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d9e2f803750033bdd6dcf756ef1ca85dc53309dd
Log: Fixed bug #74404 (wrong reflection on DateTimeZone::getTransitions)
Previous Comments:
------------------------------------------------------------------------
[2017-04-10 11:41:26] fabien dot villepinte at gmail dot com
Description:
------------
The parameters of DateTimeZone::getTransitions are optional(see: http://php.net/manual/en/datetimezone.gettransitions.php
), but they are described as required by reflection.
Test script:
---------------
<?php
$rm = new ReflectionMethod(DateTimeZone::class, "getTransitions");
printf("%d\n%d\n", $rm->getNumberOfParameters(),
$rm->getNumberOfRequiredParameters());
foreach ($rm->getParameters() as $param) {
printf("Parameter #%d %s OPTIONAL\n", $param->getPosition(),
$param->isOptional() ? "IS" : "IS NOT");
}
Expected result:
----------------
2
0
Parameter #0 IS OPTIONAL
Parameter #1 IS OPTIONAL
Actual result:
--------------
2
2
Parameter #0 IS NOT OPTIONAL
Parameter #1 IS NOT OPTIONAL
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74404&edit=1