Closed YuanchengJiang closed 1 month ago
The following code:
<?php $doc = new DOMDocument(); $doc->appendChild($doc->createElement('container')); var_dump($doc->documentElement->setAttributeNodeNS($doc)?->nodeValue);
Resulted in this output:
/php-src/ext/dom/element.c:696: dom_element_set_attribute_node_common: Assertion `attrp->type == XML_ATTRIBUTE_NODE' failed. Aborted (core dumped)
PHP 8.4.0-dev
ubuntu 22.04
https://github.com/php/php-src/blob/b438e2b1ed9b0f5a185a0385eef4d829005356a2/ext/dom/element.c#L686-L696
@nielsdos, the comment doesn't match the ZPP. Should ZPP be changed to dom_get_attr_ce(modern)?
dom_get_attr_ce(modern)
Indeed, fixed.
Description
The following code:
Resulted in this output:
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04