1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Files
archived-php-src/ext/dom/tests/bug77569.phpt
T
George Peter Banyard 8fef83dd3c Promote warnings to error in DOM extension
Closes GH-5418
2020-09-22 19:12:32 +01:00

19 lines
379 B
PHP

--TEST--
Bug #77569 (Write Access Violation in DomImplementation)
--SKIPIF--
<?php
if (!extension_loaded('dom')) die('skip dom extension not available');
?>
--FILE--
<?php
$imp = new DOMImplementation;
$dom = $imp->createDocument("", "");
try {
$dom->encoding = null;
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
Invalid document encoding