#41867 [Opn]: getName is broken
| From: | moshe at varien dot com | Date: | Sun, 01 Jul 2007 23:10:51 +0000 |
| Subject: | #41867 [Opn]: getName is broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114518@lists.php.net to get a copy of this message | ||
ID: 41867
User updated by: moshe at varien dot com
Reported By: moshe at varien dot com
Status: Open
Bug Type: SimpleXML related
Operating System: Linux
PHP Version: 5.2.3
New Comment:
Found a workaround:
$a = new SimplexmlElement("<a><b><c/></b></a>");
echo $a->b->c->c->getName();
Eeww...
Previous Comments:
------------------------------------------------------------------------
[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