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
|
// Remove infobox tables specifically
|
||||||
$removeFirstParagraph = false;
|
$removeFirstParagraph = false;
|
||||||
|
if (empty($input)) return "";
|
||||||
$firstParagraphPosition = strpos($input, '<p', 1);
|
$firstParagraphPosition = strpos($input, '<p', 1);
|
||||||
$currentSearchPos = strpos($input, "<table>");
|
$currentSearchPos = strpos($input, "<table>");
|
||||||
if ($currentSearchPos !== false && $currentSearchPos < $firstParagraphPosition) {
|
if ($currentSearchPos !== false && $currentSearchPos < $firstParagraphPosition) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user