]> git.wh0rd.org - tt-rss.git/blobdiff - plugins/af_comics/filters/af_comics_tfd.php
update phpmd ruleset to use (subset) of cleancode
[tt-rss.git] / plugins / af_comics / filters / af_comics_tfd.php
index eeec28fa3bddf48340845e55d7eade93dce1c30c..78792d25455f941f3b892eb26519f8c662a1fef1 100644 (file)
@@ -15,11 +15,8 @@ class Af_Comics_Tfd extends Af_ComicFilter {
                        if (!$res) return $article;
 
                        $doc = new DOMDocument();
-                       @$doc->loadHTML(fetch_file_contents($article["link"]));
-                       
-                       $basenode = false;
 
-                       if ($doc) {
+                       if (@$doc->loadHTML(fetch_file_contents($article["link"]))) {
                                $xpath = new DOMXPath($doc);
                                $basenode = $xpath->query('//img[contains(@src, ".gif")]')->item(0);
 
@@ -32,5 +29,4 @@ class Af_Comics_Tfd extends Af_ComicFilter {
 
                return false;
        }
-}
-?>
+}
\ No newline at end of file