mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-17 09:51:40 +00:00
Cast to string because trans() could return array
This commit is contained in:
@@ -217,12 +217,12 @@ 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);
|
||||||
$factory->setUser($user);
|
$factory->setUser($user);
|
||||||
|
|
||||||
return $factory->findOrCreate($opposingAccountName, AccountType::INITIAL_BALANCE);
|
return $factory->findOrCreate($opposingAccountName, AccountType::INITIAL_BALANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user