mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-11 16:05:50 -06:00
Cast to string because trans() could return array
This commit is contained in:
parent
fd505b77b2
commit
057619b157
@ -217,12 +217,12 @@ trait AccountServiceTrait
|
||||
*/
|
||||
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.');
|
||||
/** @var AccountFactory $factory */
|
||||
$factory = app(AccountFactory::class);
|
||||
$factory->setUser($user);
|
||||
|
||||
|
||||
return $factory->findOrCreate($opposingAccountName, AccountType::INITIAL_BALANCE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user