Remove all external dependencies

This commit is contained in:
Julian Prieber 2022-11-24 17:50:29 +01:00
parent 16b4d652c9
commit 775e5bea00

View File

@ -2356,12 +2356,13 @@ class simple_html_dom
<?php <?php
function getFavIcon($url) { function getFavIcon($url) {
try {
$urlICO = $url . "/favicon.ico"; $urlICO = $url . "/favicon.ico";
$urlICO = str_replace("//favicon.ico","/favicon.ico",$urlICO); $urlICO = str_replace("//favicon.ico","/favicon.ico",$urlICO);
$dom = new simple_html_dom(); $dom = new simple_html_dom();
$dom->load(file_get_contents($url)); $dom->load(file_get_contents($url));
$favicon = ''; $favicon = url('littlelink/icons/website.svg');
if(!function_exists('get_headers')) if(!function_exists('get_headers'))
@ -2420,7 +2421,7 @@ foreach($dom->find('link') as $e)
} }
} }
} catch (exception $e) {$favicon = url('littlelink/icons/website.svg');}
return $favicon; return $favicon;
} }