|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-08-30 11:26 UTC] csnaitsirch at web dot de
[2012-10-15 10:20 UTC] opensource at prodigy7 dot de
[2012-10-17 19:51 UTC] csnaitsirch at web dot de
[2015-05-12 17:28 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2015-05-12 17:28 UTC] cmb@php.net
[2015-05-12 21:35 UTC] csnaitsirch at web dot de
[2015-10-14 16:07 UTC] paul at muckypuddle dot com
[2023-09-10 20:57 UTC] nielsdos@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 07:00:01 2025 UTC |
Description: ------------ Hi. I want to remove a child element of an SimpleXmlElement. But that produces a strange error and I think it's a bug. This is the error message: Warning: main() [function.main]: Node no longer exists in C:\xampp\htdocs\test.php on line 5 It is very easy to reproduce. Pleas look at the test script. Test script: --------------- <?php $xml = "<root><a><aa></aa></a></root>"; $xml = simplexml_load_string($xml); foreach ($xml as $tag => $child) { unset($xml->{$tag}); } Expected result: ---------------- No errors. Actual result: -------------- Warning: main() [function.main]: Node no longer exists in C:\xampp\htdocs\test.php on line 5