Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Sanity check on number.
James Cole935634e487ec
diff --git a/app/Http/Controllers/Budget/BudgetLimitController.php b/app/Http/Controllers/Budget/BudgetLimitController.phpindex 7eade3fe56..a293e25fae 100644--- a/app/Http/Controllers/Budget/BudgetLimitController.php+++ b/app/Http/Controllers/Budget/BudgetLimitController.php@@ -202,7 +202,9 @@ class BudgetLimitController extends Controllerif ('' === $amount) {$amount = '0';}-+ if ((int)$amount > 268435456) { // 268 million, intentional integer+ $amount = '268435456';+ }// sanity check on amount:if (0 === bccomp($amount, '0')) {$budgetId = $budgetLimit->budget_id;@@ -217,9 +219,7 @@ class BudgetLimitController extends Controllerreturn response()->json($array);}- if ((int)$amount > 268435456) { // 268 million, intentional integer- $amount = '268435456';- }+if (-1 === bccomp($amount, '0')) {$amount = bcmul($amount, '-1');}