xref: /PHP-8.3/ext/dom/tests/bug77569.phpt (revision bd9f4fa6)
1--TEST--
2Bug #77569 (Write Access Violation in DomImplementation)
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7$imp = new DOMImplementation;
8$dom = $imp->createDocument("", "");
9try {
10    $dom->encoding = null;
11} catch (\ValueError $e) {
12    echo $e->getMessage() . \PHP_EOL;
13}
14?>
15--EXPECT--
16Invalid document encoding
17