From: Andrew Dolgov Date: Mon, 5 Jun 2017 07:28:59 +0000 (+0300) Subject: fix dilbert plugin not working because of changed GUIDs or w/e X-Git-Tag: 17.12~174 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1d61994776eb4275d41f9d797400ef951fdae15c;p=tt-rss.git fix dilbert plugin not working because of changed GUIDs or w/e --- diff --git a/plugins/af_comics/filters/af_comics_dilbert.php b/plugins/af_comics/filters/af_comics_dilbert.php index da5a44de..565b4465 100644 --- a/plugins/af_comics/filters/af_comics_dilbert.php +++ b/plugins/af_comics/filters/af_comics_dilbert.php @@ -7,7 +7,7 @@ class Af_Comics_Dilbert extends Af_ComicFilter { } function process(&$article) { - if (strpos($article["guid"], "dilbert.com") !== FALSE || + if (strpos($article["link"], "dilbert.com") !== FALSE || strpos($article["link"], "/DilbertDailyStrip") !== FALSE) { $res = fetch_file_contents($article["link"], false, false, false, @@ -20,11 +20,8 @@ class Af_Comics_Dilbert extends Af_ComicFilter { $res = $fetch_last_error_content; $doc = new DOMDocument(); - @$doc->loadHTML($res); - $basenode = false; - - if ($doc) { + if (@$doc->loadHTML($res)) { $xpath = new DOMXPath($doc); // Get the image container