]> git.wh0rd.org Git - tt-rss.git/commitdiff
af_comics_pa: check node exists before trying to manipulate it
authorAndrew Dolgov <noreply@fakecake.org>
Wed, 3 Dec 2014 15:06:22 +0000 (18:06 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Wed, 3 Dec 2014 15:06:22 +0000 (18:06 +0300)
plugins/af_comics/filters/af_comics_pa.php

index a13857cc165933ad146e48cccc0190ce1b245607..0848adbd0eaf7bf93facab67787cf5101ea0b65d 100644 (file)
@@ -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) {