summaryrefslogtreecommitdiffstats
path: root/utility/faviconfetcher.php
diff options
context:
space:
mode:
Diffstat (limited to 'utility/faviconfetcher.php')
-rw-r--r--utility/faviconfetcher.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/utility/faviconfetcher.php b/utility/faviconfetcher.php
index 10088dad3..c38706af6 100644
--- a/utility/faviconfetcher.php
+++ b/utility/faviconfetcher.php
@@ -74,16 +74,19 @@ class FaviconFetcher {
$file = $this->getFile($url);
- if($file->body !== '') {
+ /** @noinspection PhpUndefinedFieldInspection */
+ if($file->body !== '') {
$document = new \DOMDocument();
- @$document->loadHTML($file->body);
+ /** @noinspection PhpUndefinedFieldInspection */
+ @$document->loadHTML($file->body);
if($document) {
$xpath = new \DOMXpath($document);
$elements = $xpath->query("//link[contains(@rel, 'icon')]");
if ($elements->length > 0) {
- $iconPath = $elements->item(0)->getAttribute('href');
+ /** @noinspection PhpUndefinedMethodInspection */
+ $iconPath = $elements->item(0)->getAttribute('href');
$absPath = \SimplePie_Misc::absolutize_url($iconPath, $url);
return $absPath;
}