Add check against empty wikidata / wikipedia descriptions
This commit is contained in:
parent
fba4706b67
commit
0fa759c604
@ -298,6 +298,7 @@ final class NodaWikidataFetcher {
|
||||
|
||||
// Remove infobox tables specifically
|
||||
$removeFirstParagraph = false;
|
||||
if (empty($input)) return "";
|
||||
$firstParagraphPosition = strpos($input, '<p', 1);
|
||||
$currentSearchPos = strpos($input, "<table>");
|
||||
if ($currentSearchPos !== false && $currentSearchPos < $firstParagraphPosition) {
|
||||
|
Loading…
Reference in New Issue
Block a user