php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74383 Wrong reflection on Phar::running
Submitted: 2017-04-06 11:38 UTC Modified: 2017-04-10 05:57 UTC
From: fabien dot villepinte at gmail dot com Assigned: krakjoe (profile)
Status: Closed Package: PHAR related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2017-04-06 11:38 UTC] fabien dot villepinte at gmail dot com
Description:
------------
The parameter of Phar::running is optional but it is described as required by reflection.

Test script:
---------------
<?php

$rc = new ReflectionClass(Phar::class);
$rm = $rc->getMethod("running");
echo $rm->getNumberOfParameters();
echo PHP_EOL;
echo $rm->getNumberOfRequiredParameters();
echo PHP_EOL;
echo (int) $rm->getParameters()[0]->isOptional();

Expected result:
----------------
1
0
1

Actual result:
--------------
1
1
0

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-10 05:57 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2017-04-10 05:57 UTC] krakjoe@php.net
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.

Not sure why this didn't close automatically.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC