From bde10d03e718dadd3ea5f1d703493c80375a46f4 Mon Sep 17 00:00:00 2001 From: HorstOeko Date: Tue, 12 Nov 2024 10:51:55 +0100 Subject: [PATCH] Fix XmlDocumentReader::loadFromXmlFile --- src/XmlDocumentReader.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/XmlDocumentReader.php b/src/XmlDocumentReader.php index 925177b..ee2f6af 100644 --- a/src/XmlDocumentReader.php +++ b/src/XmlDocumentReader.php @@ -102,6 +102,7 @@ public function loadFromXmlFile(string $filename): XmlDocumentReader $prevUseInternalErrors = \libxml_use_internal_errors(true); try { + libxml_clear_errors(); $this->internalDomDocument->load($filename); if (libxml_get_last_error()) { throw new RuntimeException("Invalid XML detected.");