Fix warning, when the language is invalid

This commit is contained in:
Michael 2024-01-07 23:10:28 +00:00
parent 7e8aee61ba
commit 43fa22470c

View file

@ -88,7 +88,7 @@ class Engagement
$searchtext = self::getSearchTextForItem($parent);
if (!$store) {
$tags = array_column(Tag::getByURIId($item['parent-uri-id'], [Tag::HASHTAG]), 'name');
$language = !empty($parent['language']) ? array_key_first(json_decode($parent['language'], true)) : '';
$language = !empty($parent['language']) ? (array_key_first(json_decode($parent['language'], true)) ?? '') : '';
$store = DI::userDefinedChannel()->match($searchtext, $language, $tags, $mediatype);
}