summaryrefslogtreecommitdiffstats
path: root/utility/faviconfetcher.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-06-26 11:55:23 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-06-26 11:55:23 +0200
commit501e29f71c5d863879eb67ed311549ee46e5a04b (patch)
tree011926600e8ed1bf7100a1218c942d030a966cf7 /utility/faviconfetcher.php
parent0f56b6d62cd4af2af5276f7c073737b2d07b0ffd (diff)
style fixes
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;
}