Prevent error if wikidata doesn't return a search result
This commit is contained in:
parent
ea280fc144
commit
24714265c2
@ -1651,6 +1651,10 @@ final class NodaWikidataFetcher {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (empty($wikidata_data['search'])) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$output = [];
|
||||
|
||||
foreach ($wikidata_data['search'] as $result) {
|
||||
|
Loading…
Reference in New Issue
Block a user