summaryrefslogtreecommitdiff
path: root/plugins/af_comics/filters/af_comics_pa.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-05 10:07:34 +0300
committerAndrew Dolgov <[email protected]>2021-03-05 10:07:34 +0300
commitc8883d344029baeb83f4285144e734414f7ae737 (patch)
treeda2c85cd1efa4aba1761420b40e5775ef838e501 /plugins/af_comics/filters/af_comics_pa.php
parentbc2953b5e7623800a4e9241aad67a045da20763a (diff)
af_comics filters: don't try to load empty html
Diffstat (limited to 'plugins/af_comics/filters/af_comics_pa.php')
-rw-r--r--plugins/af_comics/filters/af_comics_pa.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/af_comics/filters/af_comics_pa.php b/plugins/af_comics/filters/af_comics_pa.php
index 380e84596..a5a81edcb 100644
--- a/plugins/af_comics/filters/af_comics_pa.php
+++ b/plugins/af_comics/filters/af_comics_pa.php
@@ -25,7 +25,9 @@ class Af_Comics_Pa extends Af_ComicFilter {
if (strpos($article["link"], "penny-arcade.com") !== false && strpos($article["title"], "News Post:") !== false) {
$doc = new DOMDocument();
- if ($doc->loadHTML(UrlHelper::fetch($article["link"]))) {
+ $res = UrlHelper::fetch($article["link"]);
+
+ if ($res && $doc->loadHTML($res)) {
$xpath = new DOMXPath($doc);
$entries = $xpath->query('(//div[@class="post"])');