From 3d39d775fa9c67c244c08682951fd600da75eaba Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 30 Sep 2009 17:01:05 +0000 Subject: [PATCH] unittests: NOBUG further fix to HTML expectations - prevent side-effects. --- lib/simpletestlib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/simpletestlib.php b/lib/simpletestlib.php index 400b22ad99d..72d75f35559 100644 --- a/lib/simpletestlib.php +++ b/lib/simpletestlib.php @@ -199,7 +199,8 @@ abstract class XMLStructureExpectation extends SimpleExpectation { if (!$parser->loadXML('' . $html . '')) { $parser = new DOMDocument(); } - libxml_use_internal_errors($prevsetting); + libxml_clear_errors(); + libxml_use_internal_errors($prevsetting); return $parser; } }