mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +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) {
|
if ($localeCompiler) {
|
||||||
$translations = $this->locales->getTranslator()->getMessages()['messages'];
|
$translations = array_get($this->locales->getTranslator()->getMessages(), 'messages', []);
|
||||||
|
|
||||||
$translations = $this->filterTranslations($translations, $keys);
|
$translations = $this->filterTranslations($translations, $keys);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user