php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74457 Wrong reflection on XMLReader::expand
Submitted: 2017-04-17 09:18 UTC Modified: -
From: fabien dot villepinte at gmail dot com Assigned:
Status: Closed Package: XML Reader
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2017-04-17 09:18 UTC] fabien dot villepinte at gmail dot com
Description:
------------
The XMLReader::expand() method has an optional parameter ( http://php.net/manual/en/xmlreader.expand.php ) but the number of parameters returned by reflection is 0.

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

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

Actual result:
--------------
int(0)
int(0)

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-02 05:26 UTC] krakjoe@php.net
Automatic comment on behalf of fabien.villepinte@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4c0e50c88ac49052c61d1f23d5797e5d00384524
Log: Fix bug #74457 Wrong reflection on XMLReader::expand
 [2017-05-02 05:26 UTC] krakjoe@php.net
-Status: Open +Status: Closed
 [2017-06-26 10:22 UTC] roelharbers at gmail dot com
This seems to cause a regression in classes extending XmlReader, see https://github.com/ComaVN/simplexmlreader_issue for an example
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC