From 9af543b6a91951eded0f1102b31ce0c1222ed86a Mon Sep 17 00:00:00 2001 From: Rytis Date: Wed, 15 Feb 2017 12:59:46 +0200 Subject: [PATCH] Update Translate.php --- Eloquent/Translate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eloquent/Translate.php b/Eloquent/Translate.php index c95e134..3a406ea 100644 --- a/Eloquent/Translate.php +++ b/Eloquent/Translate.php @@ -25,9 +25,9 @@ class Translate implements JsonSerializable { */ public function __construct($string = '', $domain = '') { - $decode = is_string($string) ? json_decode($string, true) : $string; + $decode = is_string($string) ? json_decode($string, true) : $string; $this->translations = $decode ? $decode : [ - config('app.fallback_locale') => $string + config('app.fallback_locale') => $string != '{}' ? $string : null ]; $this->locale = Translator::getLocale(); }