af_comics_pa: check node exists before trying to manipulate it
This commit is contained in:
parent
3ba0599de7
commit
2681f684c7
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue