Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix https://github.com/firefly-iii/firefly-iii/issues/12687
James Coleffa07f8b15a1
diff --git a/app/Http/Controllers/Budget/BudgetLimitController.php b/app/Http/Controllers/Budget/BudgetLimitController.phpindex de7337738f..868f601920 100644--- a/app/Http/Controllers/Budget/BudgetLimitController.php+++ b/app/Http/Controllers/Budget/BudgetLimitController.php@@ -247,12 +247,15 @@ final class BudgetLimitController extends Controllerif (-1 === bccomp($amount, '0')) {$amount = bcmul($amount, '-1');}- $notes = (string) $request->input('notes');- if (strlen($notes) > 32_768) {- $notes = substr($notes, 0, 32_768);+ $update = ['amount' => $amount];+ if($request->has('notes')) {+ $notes = (string)$request->input('notes');+ if (strlen($notes) > 32_768) {+ $notes = substr($notes, 0, 32_768);+ }+ $update['notes'] = $notes;}-- $limit = $this->blRepository->update($budgetLimit, ['amount' => $amount, 'notes' => $notes]);+ $limit = $this->blRepository->update($budgetLimit, $update);Preferences::mark();$array = $limit->toArray();diff --git a/changelog.md b/changelog.mdindex fd98d6aaf5..845e0f4402 100644--- a/changelog.md+++ b/changelog.md@@ -46,6 +46,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).- [Issue 12639](https://github.com/firefly-iii/firefly-iii/issues/12639) (Test rules endpoint always returns no results unless optional accounts argument is passed) reported by @grgar- [PR 12642](https://github.com/firefly-iii/firefly-iii/pull/12642) (Fix #12639: match accounts arg of rule trigger & test) reported by @grgar- [Issue 12662](https://github.com/firefly-iii/firefly-iii/issues/12662) (A Search for Tags returns more page groups than required) reported by @PAS-BC+- #12687- Setting an invalid language would break your account.### Security