Prevent error if wikidata doesn't return a search result

This commit is contained in:
Joshua Ramon Enslin 2021-11-30 17:53:24 +01:00
parent ea280fc144
commit 24714265c2
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -1651,6 +1651,10 @@ final class NodaWikidataFetcher {
return [];
}
if (empty($wikidata_data['search'])) {
return [];
}
$output = [];
foreach ($wikidata_data['search'] as $result) {