diff options
author | Andrew Dolgov <[email protected]> | 2021-03-05 10:07:34 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-03-05 10:07:34 +0300 |
commit | c8883d344029baeb83f4285144e734414f7ae737 (patch) | |
tree | da2c85cd1efa4aba1761420b40e5775ef838e501 /plugins/af_comics/filters/af_comics_tfd.php | |
parent | bc2953b5e7623800a4e9241aad67a045da20763a (diff) |
af_comics filters: don't try to load empty html
Diffstat (limited to 'plugins/af_comics/filters/af_comics_tfd.php')
-rw-r--r-- | plugins/af_comics/filters/af_comics_tfd.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/af_comics/filters/af_comics_tfd.php b/plugins/af_comics/filters/af_comics_tfd.php index e0216705c..19ca43a24 100644 --- a/plugins/af_comics/filters/af_comics_tfd.php +++ b/plugins/af_comics/filters/af_comics_tfd.php @@ -16,7 +16,9 @@ class Af_Comics_Tfd extends Af_ComicFilter { $doc = new DOMDocument(); - if (@$doc->loadHTML(UrlHelper::fetch($article["link"]))) { + $res = UrlHelper::fetch($article["link"]); + + if ($res && $doc->loadHTML($res)) { $xpath = new DOMXPath($doc); $basenode = $xpath->query('//img[contains(@src, ".gif")]')->item(0); |