From dbef3043eb2a819ac1b281bc9df37d34f9670e53 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Thu, 26 Mar 2020 11:19:43 +0800 Subject: [PATCH] do not break when failed to load i18n --- app/Listeners/SerializeGlobals.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Listeners/SerializeGlobals.php b/app/Listeners/SerializeGlobals.php index 28c44837..1cf47714 100644 --- a/app/Listeners/SerializeGlobals.php +++ b/app/Listeners/SerializeGlobals.php @@ -2,6 +2,8 @@ namespace App\Listeners; +use stdClass; + class SerializeGlobals { public function handle($event) @@ -13,6 +15,7 @@ class SerializeGlobals 'base_url' => url('/'), 'site_name' => option_localized('site_name'), 'route' => request()->path(), + 'i18n' => new stdClass(), 'extra' => [], ]; $event->addContent('');