From 0758d6145bea4d0492e6424ba31793c7d600dc24 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Tue, 4 Jan 2022 18:56:21 +0000 Subject: [PATCH] [COMPONENT][Collection][CONTROLLER][Collection] Use null-safe calls to attempt to get a language --- components/Collection/Util/Controller/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Collection/Util/Controller/Collection.php b/components/Collection/Util/Controller/Collection.php index df32726f8d..78b9aec28a 100644 --- a/components/Collection/Util/Controller/Collection.php +++ b/components/Collection/Util/Controller/Collection.php @@ -14,7 +14,7 @@ class Collection extends Controller public function query(string $query, ?string $locale = null, ?Actor $actor = null) { $actor ??= Common::actor(); - $locale ??= Common::currentLanguage()->getLocale(); + $locale ??= $actor?->getTopLanguage()?->getLocale(); return Feed::query($query, $this->int('page') ?? 1, $locale, $actor); } }