From 3d2310f7310c7eeb15cfa11963c1cf9143f455d7 Mon Sep 17 00:00:00 2001 From: Julian Prieber Date: Mon, 3 Jul 2023 15:01:39 +0200 Subject: [PATCH] bugfix --- resources/views/components/favicon.blade.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/resources/views/components/favicon.blade.php b/resources/views/components/favicon.blade.php index e147fdd..c2c1d15 100644 --- a/resources/views/components/favicon.blade.php +++ b/resources/views/components/favicon.blade.php @@ -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);