diff --git a/src/NodaWikidataFetcher.php b/src/NodaWikidataFetcher.php index f898fd3..2eebb53 100644 --- a/src/NodaWikidataFetcher.php +++ b/src/NodaWikidataFetcher.php @@ -281,7 +281,9 @@ final class NodaWikidataFetcher { $doc = new DOMDocument(); try { + libxml_use_internal_errors(true); $doc->loadXML('
' . trim($input) . '
'); + libxml_use_internal_errors(false); } catch (Exception $e) { throw new Exception("Failed to load DOMDocument." . PHP_EOL . $e->getMessage() . PHP_EOL . PHP_EOL . '---' . $input . '---');