summaryrefslogtreecommitdiff
path: root/plugins/af_comics/filters/af_comics_pa.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2014-12-03 18:06:22 +0300
committerAndrew Dolgov <[email protected]>2014-12-03 18:06:22 +0300
commit2681f684c7ceed8b3de70223582e947c4b83143b (patch)
treefe6a17949ac060a05a894feb18814e184d85d1cc /plugins/af_comics/filters/af_comics_pa.php
parent3ba0599de7646fc022c6c8b3687da762feabe817 (diff)
af_comics_pa: check node exists before trying to manipulate it
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 a13857cc1..0848adbd0 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) {