af_comics_pa: check node exists before trying to manipulate it

This commit is contained in:
Andrew Dolgov 2014-12-03 18:06:22 +03:00
parent 3ba0599de7
commit 2681f684c7
1 changed files with 3 additions and 1 deletions

View File

@ -56,6 +56,8 @@ class Af_Comics_Pa extends Af_ComicFilter {
if ($header->parentNode) { $header->parentNode->removeChild($header); }
$avatar = $xpath->query('(//div[@class="avatar"]//img)')->item(0);
if ($basenode)
$basenode->insertBefore($avatar, $basenode->firstChild);
$uninteresting = $xpath->query('(//div[@class="avatar"])');