[php-src] Issue #15910: Core dumped in ext/dom/element.c
| From: | YuanchengJiang | Date: | Mon, 16 Sep 2024 09:10:28 +0000 |
| Subject: | [php-src] Issue #15910: Core dumped in ext/dom/element.c | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247795@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15910
Author: YuanchengJiang
### Description
The following code:
```php
<?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 Version
PHP 8.4.0-dev
### Operating System
ubuntu 22.04