Cast to string because trans() could return array

This commit is contained in:
Dennis Enderink 2018-10-27 23:26:04 +02:00
parent fd505b77b2
commit 057619b157
No known key found for this signature in database
GPG Key ID: DCB61842FAAB4048

View File

@ -217,7 +217,7 @@ trait AccountServiceTrait
*/ */
public function storeOpposingAccount(User $user, string $name): Account public function storeOpposingAccount(User $user, string $name): Account
{ {
$opposingAccountName = trans('firefly.initial_balance_account', ['name' => $name]); $opposingAccountName = (string)trans('firefly.initial_balance_account', ['name' => $name]);
Log::debug('Going to create an opening balance opposing account.'); Log::debug('Going to create an opening balance opposing account.');
/** @var AccountFactory $factory */ /** @var AccountFactory $factory */
$factory = app(AccountFactory::class); $factory = app(AccountFactory::class);