mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-09 06:55:43 -06:00
Fixed a bug where editing a transaction would lead to unset variables.
This commit is contained in:
parent
6798cea268
commit
a84064663a
@ -292,6 +292,7 @@ class TransactionController extends BaseController
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new FireflyException('Method ' . Input::get('post_submit_action') . ' not implemented yet.');
|
||||
break;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user