diff options
author | Andrew Dolgov <[email protected]> | 2014-12-03 18:06:22 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-12-03 18:06:22 +0300 |
commit | 2681f684c7ceed8b3de70223582e947c4b83143b (patch) | |
tree | fe6a17949ac060a05a894feb18814e184d85d1cc /plugins/af_comics/filters/af_comics_pa.php | |
parent | 3ba0599de7646fc022c6c8b3687da762feabe817 (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.php | 4 |
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) { |