|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41867 getName is broken
Submitted: 2007-07-01 22:37 UTC Modified: 2007-07-02 11:38 UTC
Avg. Score:4.0 ± 0.8
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: moshe at varien dot com Assigned:
Status: Closed Package: SimpleXML related
PHP Version: 5.2.3 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: moshe at varien dot com
New email:
PHP Version: OS:


 [2007-07-01 22:37 UTC] moshe at varien dot com
getName() returns name of the parent node instead of supplied one

Reproduce code:
$a = new SimplexmlElement("<a><b><c/></b></a>"); 
echo $a->b->c->getName();

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-01 23:10 UTC] moshe at varien dot com
Found a workaround:

$a = new SimplexmlElement("<a><b><c/></b></a>"); 
echo $a->b->c->c->getName();

 [2007-07-02 11:38 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
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 Jul 25 10:01:29 2024 UTC