xref: /PHP-8.3/ext/dom/tests/bug79968.phpt (revision 23ba4cde)
1--TEST--
2dom: Bug #79968 - Crash when calling before without valid hierachy
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$cdata = new DOMText;
9
10$cdata->before("string");
11$cdata->after("string");
12$cdata->replaceWith("string");
13
14$dom = new DOMDocument();
15$dom->adoptNode($cdata);
16var_dump($dom->saveXML($cdata));
17
18?>
19--EXPECT--
20string(0) ""
21