Skip to content

Assertion failure in DOM->replaceChild #16593

Closed

Description

@chibinz

Description

The following code:

<?php

$v1 = new DOMElement ( "xm" , "y" , "z" );
$v2 = new DOMAttr ( "v" );
$v3 = new DOMElement ( "RF" , "fV" );
$v6 = new DOMDocument ( "Av" );
$v7 = new DOMElement ( "mh" , null , "m" );

$v3 -> replaceChildren ( $v7 );
$v7 -> prepend ( $v1 );
$v6 -> insertBefore ( $v3 );
$v7 -> replaceChild ( $v2 , $v1 );

Resulted in this output:

php: /tmp/php-asan/ext/dom/php_dom.c:2032: void dom_reconcile_ns(xmlDocPtr, xmlNodePtr): Assertion `nodep->type != XML_ATTRIBUTE_NODE' failed.

PHP Version

PHP 8.5.0-dev

Operating System

No response

Activity

  1. added a commit that references this issue on Oct 25, 2024
    58cead1
  2. added 2 commits that reference this issue on Oct 28, 2024
    d89dd28
    ed21ebd
  3. added 2 commits that reference this issue on Oct 28, 2024
    6e82ae9
    99cdd67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions