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