Bug #80600 [NEW]: DOMChildNode::remove() doesn't work on CharacterData nodes

From: Date: Wed, 06 Jan 2021 19:55:52 +0000
Subject: Bug #80600 [NEW]: DOMChildNode::remove() doesn't work on CharacterData nodes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231418@lists.php.net to get a copy of this message
From: jules dot bernable at gmail dot com Operating system: debian PHP version: 8.0.0 Package: DOM XML related Bug Type: Bug Bug description:DOMChildNode::remove() doesn't work on CharacterData nodes Description: ------------ CharacterData nodes implement the new DomChildNode interface, but the DOMChildNode::remove() method doesn't work. See the provided test script. Text, comments and CDATA nodes should be removed. They are not. Test script: --------------- <php $doc = new \DOMDocument(); $doc->loadXML('<a>foo</a>'); $doc->documentElement->firstChild->remove(); echo $doc->saveXML($doc->documentElement); Expected result: ---------------- <a></a> Actual result: -------------- <a>foo</a> -- Edit bug report at https://bugs.php.net/bug.php?id=80600&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80600&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80600&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80600&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80600&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80600&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80600&r=support Expected behavior: https://bugs.php.net/fix.php?id=80600&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80600&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80600&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80600&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80600&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80600&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80600&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80600&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80600&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80600&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80600&r=mysqlcfg

« previous php.bugs (#231418) next »