Fix type safety error
This commit is contained in:
parent
5819caff91
commit
1a9b195067
|
@ -395,9 +395,12 @@ final class NodaWikidataFetcher {
|
|||
$p->parentNode->removeChild($p);
|
||||
}
|
||||
|
||||
$firstP = $doc->getElementsByTagName("p")->item(0);
|
||||
if (strpos($doc->saveHTML($firstP), 'geohack') !== false) {
|
||||
if ($firstP !== null && $firstP->parentNode !== null) $firstP->parentNode->removeChild($firstP);
|
||||
if (($firstP = $doc->getElementsByTagName("p")->item(0)) !== null) {
|
||||
if (($firstPhtml = $doc->saveHTML($firstP)) !== false) {
|
||||
if (strpos($firstPhtml, 'geohack') !== false) {
|
||||
if ($firstP->parentNode !== null) $firstP->parentNode->removeChild($firstP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user