forked from GNUsocial/gnu-social
[COMPONENT][Collection][CONTROLLER][Collection] Use null-safe calls to attempt to get a language
This commit is contained in:
parent
d17f276419
commit
0758d6145b
@ -14,7 +14,7 @@ class Collection extends Controller
|
|||||||
public function query(string $query, ?string $locale = null, ?Actor $actor = null)
|
public function query(string $query, ?string $locale = null, ?Actor $actor = null)
|
||||||
{
|
{
|
||||||
$actor ??= Common::actor();
|
$actor ??= Common::actor();
|
||||||
$locale ??= Common::currentLanguage()->getLocale();
|
$locale ??= $actor?->getTopLanguage()?->getLocale();
|
||||||
return Feed::query($query, $this->int('page') ?? 1, $locale, $actor);
|
return Feed::query($query, $this->int('page') ?? 1, $locale, $actor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user