diff --git a/app/Models/ClientContact.php b/app/Models/ClientContact.php index 939dc7140d..1df334bdf2 100644 --- a/app/Models/ClientContact.php +++ b/app/Models/ClientContact.php @@ -297,7 +297,7 @@ class ClientContact extends Authenticatable implements HasLocalePreference return $languages->first(function ($item) { return $item->id == $this->client->getSetting('language_id'); - })->locale; + })->locale ?? 'en'; } public function routeNotificationForMail($notification) diff --git a/app/Models/VendorContact.php b/app/Models/VendorContact.php index 197ebddd33..6b3fce06a7 100644 --- a/app/Models/VendorContact.php +++ b/app/Models/VendorContact.php @@ -189,7 +189,7 @@ class VendorContact extends Authenticatable implements HasLocalePreference return $languages->first(function ($item) { return $item->id == $this->company->getSetting('language_id'); - })->locale; + })->locale ?? 'en'; } /**