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