Bug #74708 [Asn->Csd]: Invalid Reflection signatures for random_bytes and random_int
| From: | remi@php.net | Date: | Tue, 13 Jun 2017 06:17:03 +0000 |
| Subject: | Bug #74708 [Asn->Csd]: Invalid Reflection signatures for random_bytes and random_int | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-209510@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74708&edit=1
ID: 74708
Updated by: remi@php.net
Reported by: tandre at themeetgroup dot com
Summary: Invalid Reflection signatures for random_bytes and
random_int
-Status: Assigned
+Status: Closed
Type: Bug
Package: Math related
PHP Version: Irrelevant
Assigned To: remi
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Fixed in
https://github.com/php/php-src/commit/81b2533a68ffc4fdc7ba0a4b8e516fe1a495451f
Previous Comments:
------------------------------------------------------------------------
[2017-06-08 06:56:42] tandre at themeetgroup dot com
Description:
------------
ReflectionFunction returns 0 for getNumberOfRequiredParameters for random_bytes() and random_int(),
but should return 1 and 2, respectively.
Test script:
---------------
$rf = new ReflectionFunction('random_bytes');
var_dump($rf->getNumberOfParameters());
var_dump($rf->getNumberOfRequiredParameters());
$rf = new ReflectionFunction('random_int');
var_dump($rf->getNumberOfParameters());
var_dump($rf->getNumberOfRequiredParameters());
Expected result:
----------------
int(1)
int(1)
int(2)
int(2)
Actual result:
--------------
int(1)
int(0)
int(2)
int(0)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74708&edit=1