mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Update find methods to return null
This commit is contained in:
@@ -116,7 +116,7 @@ class SetSourceAccount implements ActionInterface
|
||||
{
|
||||
$account = $this->repository->findByName($this->action->action_value, [AccountType::DEFAULT, AccountType::ASSET]);
|
||||
|
||||
if (null === $account->id) {
|
||||
if (null === $account) {
|
||||
Log::debug(sprintf('There is NO asset account called "%s".', $this->action->action_value));
|
||||
|
||||
return false;
|
||||
@@ -133,7 +133,7 @@ class SetSourceAccount implements ActionInterface
|
||||
private function findRevenueAccount()
|
||||
{
|
||||
$account = $this->repository->findByName($this->action->action_value, [AccountType::REVENUE]);
|
||||
if (null === $account->id) {
|
||||
if (null === $account) {
|
||||
// create new revenue account with this name:
|
||||
$data = [
|
||||
'name' => $this->action->action_value,
|
||||
|
Reference in New Issue
Block a user