]> git.mxchange.org Git - friendica.git/commitdiff
Fix warning, when the language is invalid
authorMichael <heluecht@pirati.ca>
Sun, 7 Jan 2024 23:10:28 +0000 (23:10 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 28 Jan 2024 15:37:42 +0000 (16:37 +0100)
src/Model/Post/Engagement.php

index a9e1bbfbda50239316890dad98be497f488dcaad..4070112752128e611111aef6fe6975670fffaa42 100644 (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);
                }