From 938782e60ffd5e7e9c100fd2d1d7967065286a28 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 19 Apr 2018 22:07:54 +0200 Subject: [PATCH] Work-around for a non-flushed xml error buffer --- wcfsetup/install/files/lib/util/XML.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wcfsetup/install/files/lib/util/XML.class.php b/wcfsetup/install/files/lib/util/XML.class.php index 043ea3fe27..59091f7a40 100644 --- a/wcfsetup/install/files/lib/util/XML.class.php +++ b/wcfsetup/install/files/lib/util/XML.class.php @@ -58,6 +58,10 @@ class XML { throw new SystemException("Could not read xml document located at '".$this->path."'."); } + // flush the error buffer in case someone used global xml functions + // without polling / clearing the buffer after use + libxml_clear_errors(); + // load xml document $this->document->load($path); @@ -77,6 +81,10 @@ class XML { public function loadXML($path, $xml) { $this->path = $path; + // flush the error buffer in case someone used global xml functions + // without polling / clearing the buffer after use + libxml_clear_errors(); + // load xml document $this->document->loadXML($xml); -- 2.20.1