From: tjhunt Date: Wed, 30 Sep 2009 17:01:05 +0000 (+0000) Subject: unittests: NOBUG further fix to HTML expectations - prevent side-effects. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3d39d775fa9c67c244c08682951fd600da75eaba;p=moodle.git unittests: NOBUG further fix to HTML expectations - prevent side-effects. --- diff --git a/lib/simpletestlib.php b/lib/simpletestlib.php index 400b22ad99..72d75f3555 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; } }