Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fixed a bug where editing a transaction would lead to unset variables.
Sander Dorigoa84064663aa5
diff --git a/app/controllers/TransactionController.php b/app/controllers/TransactionController.phpindex 63b3b34af0..6c66675ce4 100644--- a/app/controllers/TransactionController.php+++ b/app/controllers/TransactionController.php@@ -292,6 +292,7 @@ class TransactionController extends BaseController}break;+default:throw new FireflyException('Method ' . Input::get('post_submit_action') . ' not implemented yet.');break;diff --git a/app/lib/Firefly/Helper/Controllers/Transaction.php b/app/lib/Firefly/Helper/Controllers/Transaction.phpindex 281d35b3b8..c6cf4c665a 100644--- a/app/lib/Firefly/Helper/Controllers/Transaction.php+++ b/app/lib/Firefly/Helper/Controllers/Transaction.php@@ -167,7 +167,7 @@ class Transaction implements TransactionInterface/** Connect budget and category:*/- $budgetids = is_null($budget) ? [] : [$budget->id];+ $budgetids = !isset($budget) || (isset($budget) && is_null($budget)) ? [] : [$budget->id];$catids = is_null($category) ? [] : [$category->id];$journal->budgets()->sync($budgetids);$journal->categories()->sync($catids);