php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77619 Wrong reflection on MultipleIterator::__construct
Submitted: 2019-02-14 11:58 UTC Modified: -
From: fabien dot villepinte at gmail dot com Assigned:
Status: Closed Package: SPL related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2019-02-14 11:58 UTC] fabien dot villepinte at gmail dot com
Description:
------------
ReflectionMethod::getNumberOfRequiredParameters() returns 1 for MultipleIterator::__construct() whereas it should return 0.

See: https://secure.php.net/manual/en/class.reflectionmethod.php

Test script:
---------------
<?php
$rm = new ReflectionMethod('MultipleIterator','__construct');
var_dump($rm->getNumberOfParameters());
var_dump($rm->getNumberOfRequiredParameters());

Expected result:
----------------
int(1)
int(0)

Actual result:
--------------
int(1)
int(1)

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-14 11:59 UTC]
The following pull request has been associated:

Patch Name: Fix MultipleIterator::__construct() arginfo
On GitHub:  https://github.com/php/php-src/pull/3830
Patch:      https://github.com/php/php-src/pull/3830.patch
 [2019-02-14 16:04 UTC] [email protected]
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Apr 28 09:01:24 2021 UTC