Closed
Description
Description
The following code:
<?php
$html = <<<HTML
<head>
</html>
HTML;
$dom = Dom\HTMLDocument::createFromString($html);
$a = $dom->head->firstChild->cloneNode(false);
echo $dom->saveHTML($a), "\n";
Resulted in this output:
/php-src/ext/dom/html5_serializer.c:134:20: runtime error: member access within null pointer of type 'struct _xmlNode'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/ext/dom/html5_serializer.c:134:20 in
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04