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