From: Michael Date: Sun, 7 Jan 2024 23:10:28 +0000 (+0000) Subject: Fix warning, when the language is invalid X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fa743983aeb1ac8ea5261e7d4b3d5b8984009919;p=friendica.git Fix warning, when the language is invalid --- diff --git a/src/Model/Post/Engagement.php b/src/Model/Post/Engagement.php index a9e1bbfbda..4070112752 100644 --- a/src/Model/Post/Engagement.php +++ b/src/Model/Post/Engagement.php @@ -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); }