With no category, the transaction journal store procedure would fail.

This commit is contained in:
James Cole 2014-11-19 21:17:21 +01:00
parent e75c5aac49
commit 0c2f9d22b9

View File

@ -137,7 +137,7 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
$journal->budgets()->save($budget); $journal->budgets()->save($budget);
} }
} }
if (strlen($data['category']) > 0) { if (isset($data['category']) && strlen($data['category']) > 0) {
/** @var \FireflyIII\Database\Category $categoryRepository */ /** @var \FireflyIII\Database\Category $categoryRepository */
$categoryRepository = \App::make('FireflyIII\Database\Category'); $categoryRepository = \App::make('FireflyIII\Database\Category');
$category = $categoryRepository->firstOrCreate($data['category']); $category = $categoryRepository->firstOrCreate($data['category']);