1--TEST--
2Test DOMDocument::load() with invalid paths
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7// create dom document
8$dom = new DOMDocument();
9try {
10    $dom->load("");
11} catch (ValueError $exception) {
12    echo $exception->getMessage() . "\n";
13}
14
15try {
16    $dom->load("/path/with/\0/byte");
17} catch (ValueError $exception) {
18    echo $exception->getMessage() . "\n";
19}
20
21// Path is too long
22var_dump($dom->load(str_repeat(" ", PHP_MAXPATHLEN + 1)));
23?>
24--EXPECT--
25DOMDocument::load(): Argument #1 ($filename) must not be empty
26DOMDocument::load(): Argument #1 ($filename) must not contain any null bytes
27bool(false)
28