Bug #81642 [Com]: DOMChildNode::replaceWith() bug when replacing a node with itself.
| From: | LouiseTalbot at rhyta dot com | Date: | Tue, 10 Jan 2023 08:07:07 +0000 |
| Subject: | Bug #81642 [Com]: DOMChildNode::replaceWith() bug when replacing a node with itself. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-243386@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81642&edit=1
ID: 81642
Comment by: LouiseTalbot at rhyta dot com
Reported by: jules dot bernable at gmail dot com
Summary: DOMChildNode::replaceWith() bug when replacing a
node with itself.
Status: Verified
Type: Bug
Package: DOM XML related
Operating System: debian unstable
PHP Version: 8.0.0
Assigned To: beberlei
Block user comment: N
Private report: N
New Comment:
The childNodes property returns a NodeList containing the child nodes of the selected node If the
selected node has no children, this property returns a NodeList containing no nodes.
<https://www.thirtyonetoday.me/>github.com
Previous Comments:
------------------------------------------------------------------------
[2023-01-09 09:37:38] fosliffebernie at gmail dot com
If you are trying to replace more than one node at once, you have to be careful about iterating over
the DOMNodeList. If the old node has a different name from the new node, it will be removed from the
list once it has been replaced. Use a regressive loop: $newelement =
$xml>createTextNode('Some new node!');
<https://www.novitasphere.us/>github.com
------------------------------------------------------------------------
[2023-01-03 08:55:49] fosliffebernie at gmail dot com
<https://www.mywafflehouse.us/>github.com
------------------------------------------------------------------------
[2022-12-24 04:48:50] OscarHutchinson at dayrep dot com
English PHP documentation. Contribute to php/doc-en development by creating an account on GitHub.
<https://www.hisdconnect.net/>github.com
------------------------------------------------------------------------
[2022-12-20 09:16:06] fosliffebernie at gmail dot com
DOMChildNode.cpp Go to the documentation of this file. 00001 /* 00002 * Licensed to the Apache
Software Foundation (ASF) under one or more 00003 * contributor license agreements.
<https://www.mywafflehouse.net/>github.com
------------------------------------------------------------------------
[2022-12-16 05:24:49] LiamBaker at teleworm dot us
DOMChildNode.cpp Go to the documentation of this file. 00001 /* 00002 * Licensed to the Apache
Software Foundation (ASF) under one or more 00003 * contributor license agreements.
<https://www.myccpay.fyi/>github.com
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=81642
--
Edit this bug report at https://bugs.php.net/bug.php?id=81642&edit=1