mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 21:43:38 +08:00
Prevent crash when no locales are enabled
This commit is contained in:
parent
9e7c30044a
commit
6cc3dd4dea
|
@ -157,7 +157,7 @@ abstract class AbstractClientController extends AbstractHtmlController
|
|||
);
|
||||
|
||||
if ($localeCompiler) {
|
||||
$translations = $this->locales->getTranslator()->getMessages()['messages'];
|
||||
$translations = array_get($this->locales->getTranslator()->getMessages(), 'messages', []);
|
||||
|
||||
$translations = $this->filterTranslations($translations, $keys);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user