php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71077 ReflectionMethod for ArrayObject constructor returns wrong number of parameters
Submitted: 2015-12-09 21:20 UTC Modified: -
From: ondrej at mirtes dot cz Assigned:
Status: Closed Package: Reflection related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2015-12-09 21:20 UTC] ondrej at mirtes dot cz
Description:
------------
ReflectionMethod::getParameters() for ArrayObject constructor returns one parameter, although in practice the function accepts three parameters (and documentation states the same).
https://3v4l.org/MfKsQ

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

$ref = new ReflectionClass('ArrayObject');
var_dump(count($ref->getMethod('__construct')->getParameters()));

Expected result:
----------------
int(3)

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-10 00:58 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7c1ddcc67f2777ce1789bb3f3fc7a614aad8a3dc
Log: Fixed bug #71077 (ReflectionMethod for ArrayObject constructor returns wrong number of parameters)
 [2015-12-10 00:58 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2016-07-20 11:34 UTC] davey@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7c1ddcc67f2777ce1789bb3f3fc7a614aad8a3dc
Log: Fixed bug #71077 (ReflectionMethod for ArrayObject constructor returns wrong number of parameters)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 08:01:29 2024 UTC