From f6ff3a28d60c24dea2a05344d9b7eb823f09b4e5 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 4 Oct 2013 11:22:17 +0200 Subject: Fixed bug #64230 (XMLReader does not suppress errors) --- ext/xmlreader/tests/bug64230.phpt | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 ext/xmlreader/tests/bug64230.phpt (limited to 'ext/xmlreader/tests') diff --git a/ext/xmlreader/tests/bug64230.phpt b/ext/xmlreader/tests/bug64230.phpt new file mode 100644 index 0000000000..0b070925f3 --- /dev/null +++ b/ext/xmlreader/tests/bug64230.phpt @@ -0,0 +1,50 @@ +--TEST-- +Bug #64230 (XMLReader does not suppress errors) +--SKIPIF-- + +--FILE-- +message); + } + libxml_clear_errors(); +} + +echo "Internal errors TRUE\n"; +libxml_use_internal_errors(true); + +$x = new XMLReader; +$x->xml(""); +$x->read(); + +show_internal_errors(); + +echo "Internal errors FALSE\n"; +libxml_use_internal_errors(false); + +$x = new XMLReader; +$x->xml(""); +$x->read(); + +show_internal_errors(); + +?> +Done +--EXPECTF-- +Test +Internal errors TRUE +Internal: Specification mandate value for attribute att + +Internal errors FALSE + +Warning: XMLReader::read(): %s: parser error : Specification mandate value for attribute att in %s on line %d + +Warning: XMLReader::read(): in %s on line %d + +Warning: XMLReader::read(): ^ in %s on line %d +Done -- cgit v1.2.1