Browse Source

get_favicon_url: only check base elements with href attribute

wn_ 2 years ago
parent
commit
701c5a7ee4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      include/functions.php

+ 1 - 1
include/functions.php

@@ -575,7 +575,7 @@
 			$doc->loadHTML($html);
 			$xpath = new DOMXPath($doc);
 
-			$base = $xpath->query('/html/head/base');
+			$base = $xpath->query('/html/head/base[@href]');
 			foreach ($base as $b) {
 				$url = rewrite_relative_url($url, $b->getAttribute("href"));
 				break;