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

Pull Requests

Pull requests:

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] nikic@php.net
Automatic comment on behalf of fabien.villepinte@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ce7552af381f980a1070e258f051b76004268b3a
Log: Fixed bug #77619
 [2019-02-14 16:04 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC