Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Basic amount fix
James Cole0b49e9b8a823
diff --git a/app/Http/Controllers/Budget/BudgetLimitController.php b/app/Http/Controllers/Budget/BudgetLimitController.phpindex 71b918fa86..6a0b92ec68 100644--- a/app/Http/Controllers/Budget/BudgetLimitController.php+++ b/app/Http/Controllers/Budget/BudgetLimitController.php@@ -148,6 +148,15 @@ class BudgetLimitController extends ControllerLog::debug(sprintf('Start: %s, end: %s', $start->format('Y-m-d'), $end->format('Y-m-d')));$limit = $this->blRepository->find($budget, $currency, $start, $end);++ // sanity check on amount:+ if ((float) $amount === 0.0) {+ $amount = '1';+ }+ if ((int) $amount > 65536) {+ $amount = '65536';+ }+if (null !== $limit) {$limit->amount = $amount;$limit->save();