php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53991 SimpleXMLElement::__construct shows no params via ReflectionMethod
Submitted: 2011-02-11 04:54 UTC Modified: 2011-02-11 22:11 UTC
From: aferreira@php.net Assigned: felipe (profile)
Status: Closed Package: SimpleXML related
PHP Version: 5.3.5 OS: Ubuntu
Private report: No CVE-ID: None
 [2011-02-11 04:54 UTC] aferreira@php.net
Description:
------------
When looking up the SimpleXMLElement::__construct or using any class that extends 
SimpleXMLElement (the __construct method is final so we can't extend it), 
Reflection reports that the method has no params available, when in fact, there 
are plenty and the '$data' param is required.

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

$ref = new ReflectionClass('SimpleXMLElement');

$constructor = $ref->getConstructor();

print_r($constructor->getParameters());

Expected result:
----------------
Array
(
    'paramname' => 'type'
)

Actual result:
--------------
Array
(
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-11 22:10 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=308262
Log: - Fixed bug #53991 (SimpleXMLElement::__construct shows no params via ReflectionMethod)
 [2011-02-11 22:11 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2011-02-11 22:11 UTC] felipe@php.net
This bug has been fixed in SVN.

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/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 13:01:28 2024 UTC