1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/xmlreader/tests/bug81521.phpt
Nikita Popov 53f89219ab Fix bug #81521
The current error message is incorrect -- the problem here is not
that the property is invalid, but that these methods are unusable
prior to loading data, same as read().
2021-10-12 16:42:32 +02:00

20 lines
493 B
PHP

--TEST--
Bug #81521: XMLReader::getParserProperty may throw with a valid property
--FILE--
<?php
$reader = new XMLReader();
try {
var_dump($reader->setParserProperty(XMLReader::LOADDTD, 1));
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
try {
var_dump($reader->getParserProperty(XMLReader::LOADDTD));
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Cannot access parser properties before loading data
Cannot access parser properties before loading data