xref: /PHP-8.4/ext/xmlreader/tests/bug81521.phpt (revision a4acba9e)
1--TEST--
2Bug #81521: XMLReader::getParserProperty may throw with a valid property
3--EXTENSIONS--
4xmlreader
5--FILE--
6<?php
7$reader = new XMLReader();
8try {
9    var_dump($reader->setParserProperty(XMLReader::LOADDTD, 1));
10} catch (Error $e) {
11    echo $e->getMessage(), "\n";
12}
13try {
14    var_dump($reader->getParserProperty(XMLReader::LOADDTD));
15} catch (Error $e) {
16    echo $e->getMessage(), "\n";
17}
18?>
19--EXPECT--
20Cannot access parser properties before loading data
21Cannot access parser properties before loading data
22