Bug #53991 [Opn->Csd]: SimpleXMLElement::__construct shows no params via ReflectionMethod

From: Date: Fri, 11 Feb 2011 21:11:23 +0000
Subject: Bug #53991 [Opn->Csd]: SimpleXMLElement::__construct shows no params via ReflectionMethod
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-158713@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53991&edit=1 ID: 53991 Updated by: felipe@php.net Reported by: aferreira@php.net Summary: SimpleXMLElement::__construct shows no params via ReflectionMethod -Status: Open +Status: Closed Type: Bug Package: SimpleXML related Operating System: Ubuntu PHP Version: 5.3.5 -Assigned To: +Assigned To: felipe Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2011-02-11 22:10:50] 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 04:54:58] 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 ( ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53991&edit=1

« previous php.bugs (#158713) next »