PHP 5.3 compatibility

This commit is contained in:
Phyks 2014-08-29 16:14:09 +02:00
parent 3b42a148f3
commit 9b597f3b38

View File

@ -74,13 +74,13 @@ function getFavicon($urls) {
if(strstr((string) $attribute, 'icon')) { if(strstr((string) $attribute, 'icon')) {
$tmp = $head_tag->attributes(); $tmp = $head_tag->attributes();
if(isset($tmp['sizes'])) { if(isset($tmp['sizes'])) {
$sizes = (string)$head_tag->attributes()['sizes']; $sizes = (string) $tmp['sizes'];
} }
else { else {
$sizes = ''; $sizes = '';
} }
$favicons[$url][] = array( $favicons[$url][] = array(
'favicon_url'=>(string) $head_tag->attributes()['href'], 'favicon_url'=>(string) $tmp['href'],
'sizes'=>$sizes 'sizes'=>$sizes
); );
$go_next_tag = true; $go_next_tag = true;