From: Andrew Dolgov Date: Wed, 3 Dec 2014 15:06:22 +0000 (+0300) Subject: af_comics_pa: check node exists before trying to manipulate it X-Git-Tag: 1.15~6 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=2681f684c7ceed8b3de70223582e947c4b83143b;p=tt-rss.git af_comics_pa: check node exists before trying to manipulate it --- diff --git a/plugins/af_comics/filters/af_comics_pa.php b/plugins/af_comics/filters/af_comics_pa.php index a13857cc..0848adbd 100644 --- a/plugins/af_comics/filters/af_comics_pa.php +++ b/plugins/af_comics/filters/af_comics_pa.php @@ -56,7 +56,9 @@ class Af_Comics_Pa extends Af_ComicFilter { if ($header->parentNode) { $header->parentNode->removeChild($header); } $avatar = $xpath->query('(//div[@class="avatar"]//img)')->item(0); - $basenode->insertBefore($avatar, $basenode->firstChild); + + if ($basenode) + $basenode->insertBefore($avatar, $basenode->firstChild); $uninteresting = $xpath->query('(//div[@class="avatar"])'); foreach ($uninteresting as $i) {