mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.3'
* PHP-8.3: Fix crash in ParentNode::append() when dealing with a fragment containing text nodes
This commit is contained in:
21
ext/dom/tests/ParentNode_append_fragment_text_coalesce.phpt
Normal file
21
ext/dom/tests/ParentNode_append_fragment_text_coalesce.phpt
Normal file
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Text coalesce bug when appending fragment with text nodes
|
||||
--EXTENSIONS--
|
||||
dom
|
||||
--FILE--
|
||||
<?php
|
||||
$document = new DOMDocument();
|
||||
$document->loadXML('<root/>');
|
||||
|
||||
$sut = $document->createDocumentFragment();
|
||||
for($i = 0; $i < 10; $i++) {
|
||||
$textNode = $document->createTextNode("Node$i");
|
||||
$sut->append($textNode);
|
||||
}
|
||||
|
||||
$document->documentElement->append($sut);
|
||||
echo $document->saveXML();
|
||||
?>
|
||||
--EXPECT--
|
||||
<?xml version="1.0"?>
|
||||
<root>Node0Node1Node2Node3Node4Node5Node6Node7Node8Node9</root>
|
||||
Reference in New Issue
Block a user