This commit is contained in:
Julian Prieber 2023-07-03 15:01:39 +02:00 committed by GitHub
parent df3a6e3747
commit 3d2310f731
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -27,10 +27,14 @@ function getFavIcon($id) {
$html = @file_get_contents($url, false, $context);
}
$dom = new DOMDocument();
if ($html !== false) {
$dom = new DOMDocument();
if ($html !== false) {
try {
@$dom->loadHTML($html);
}
} catch (Throwable $e) {}
}
$xpath = new DOMXPath($dom);