#41867 [Opn->Csd]: getName is broken
| From: | rrichards@php.net | Date: | Mon, 02 Jul 2007 11:38:14 +0000 |
| Subject: | #41867 [Opn->Csd]: getName is broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114530@lists.php.net to get a copy of this message | ||
ID: 41867
Updated by: rrichards@php.net
Reported By: moshe at varien dot com
-Status: Open
+Status: Closed
Bug Type: SimpleXML related
Operating System: Linux
PHP Version: 5.2.3
New Comment:
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
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-07-01 23:10:51] moshe at varien dot com
Found a workaround:
$a = new SimplexmlElement("<a><b><c/></b></a>");
echo $a->b->c->c->getName();
Eeww...
------------------------------------------------------------------------
[2007-07-01 22:37:10] moshe at varien dot com
Description:
------------
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:
----------------
"c"
Actual result:
--------------
"b"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41867&edit=1