mirror of
https://github.com/php/php-src.git
synced 2026-04-22 15:38:49 +02:00
d027bc2add
xmlNodeSetContentLen() calls xmlFreeNode() on node->children. This causes problems if there are other references around to those children.
16 lines
323 B
PHP
16 lines
323 B
PHP
--TEST--
|
|
Bug #69373 References to deleted XPath query results
|
|
--FILE--
|
|
<?php
|
|
$doc = new DOMDocument();
|
|
for( $i=0; $i<20; $i++ ) {
|
|
$doc->loadXML("<parent><child /><child /></parent>");
|
|
$xpath = new DOMXpath($doc);
|
|
$all = $xpath->query('//*');
|
|
$doc->firstChild->nodeValue = '';
|
|
}
|
|
echo 'DONE', PHP_EOL;
|
|
?>
|
|
--EXPECT--
|
|
DONE
|