Disable libxml errors when parsing Wikipedia information
This commit is contained in:
parent
d0c4bfcf1f
commit
054dc731f1
|
@ -150,10 +150,12 @@ final class NodaWikidataFetcher {
|
|||
|
||||
if (empty($wikipedia_cont = MD_STD::runCurl($linkUrl))) return '';
|
||||
|
||||
libxml_use_internal_errors(true);
|
||||
$doc = new DOMDocument();
|
||||
if (!$doc->loadHTML($wikipedia_cont)) {
|
||||
return '';
|
||||
}
|
||||
libxml_use_internal_errors(false);
|
||||
|
||||
if (!($wikidataLinkLi = $doc->getElementById("t-wikibase"))) {
|
||||
return '';
|
||||
|
|
Loading…
Reference in New Issue
Block a user