mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-28 01:41:14 -06:00
Try to catch a null pointer.
This commit is contained in:
parent
bd0be97137
commit
d85ccb6ab2
@ -41,6 +41,7 @@ use Illuminate\Database\Eloquent\Builder;
|
|||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
use Navigation;
|
use Navigation;
|
||||||
|
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BudgetRepository.
|
* Class BudgetRepository.
|
||||||
@ -104,7 +105,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
// delete limits with amount 0:
|
// delete limits with amount 0:
|
||||||
try {
|
try {
|
||||||
BudgetLimit::where('amount', 0)->delete();
|
BudgetLimit::where('amount', 0)->delete();
|
||||||
} catch (Exception $e) {
|
} catch (Exception|FatalThrowableError $e) {
|
||||||
Log::debug(sprintf('Could not delete budget limit: %s', $e->getMessage()));
|
Log::debug(sprintf('Could not delete budget limit: %s', $e->getMessage()));
|
||||||
}
|
}
|
||||||
Budget::where('order',0)->update(['order' => 100]);
|
Budget::where('order',0)->update(['order' => 100]);
|
||||||
@ -119,7 +120,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
// delete it!
|
// delete it!
|
||||||
try {
|
try {
|
||||||
BudgetLimit::find($budgetLimit->id)->delete();
|
BudgetLimit::find($budgetLimit->id)->delete();
|
||||||
} catch (Exception $e) {
|
} catch (Exception|FatalThrowableError $e) {
|
||||||
Log::debug(sprintf('Could not delete budget limit: %s', $e->getMessage()));
|
Log::debug(sprintf('Could not delete budget limit: %s', $e->getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user