Skip to content

Assertion failure in DOM -> before #16594

Closed
@chibinz

Description

@chibinz

Description

The following code:

<?php

$v1 = new DOMText ( "wr" );
$v2 = new DOMDocument (  );
$v6 = new DOMComment ( "aw" );
$v7 = new DOMAttr ( "r" , "iL" );
$v9 = new DOMElement ( "h" , null );

$v2 -> adoptNode ( $v9 );
$v9 -> setAttributeNodeNS ( $v7 );
$v7 -> insertBefore ( $v1 , null );
$v1 -> before ( $v6 );

Resulted in this output:

php: /tmp/php-asan/ext/dom/parentnode/tree.c:243: _Bool dom_is_pre_insert_valid_without_step_1(php_libxml_ref_obj *, xmlNodePtr, xmlNodePtr, xmlNodePtr, xmlDocPtr): Assertion `!php_dom_pre_insert_is_parent_invalid(parentNode)' failed.

PHP Version

PHP 8.5.0-dev

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions