Accept empty extract data from Wikidata

This commit is contained in:
2025-08-10 18:43:33 +02:00
parent aa1d72cb64
commit db0aa0671b

View File

@@ -138,7 +138,7 @@ final class NodaWikidataFetcher {
return ''; return '';
} }
$firstPageId = array_keys($json_decoded['query']['pages'])[0]; $firstPageId = array_keys($json_decoded['query']['pages'])[0];
$datafromwiki = strval($json_decoded['query']['pages'][$firstPageId]['extract']); $datafromwiki = strval($json_decoded['query']['pages'][$firstPageId]['extract'] ?? "");
return self::_cleanInputSimple($datafromwiki); return self::_cleanInputSimple($datafromwiki);