Fix null pointer exception. #846

This commit is contained in:
James Cole 2017-09-15 17:35:44 +02:00
parent c8cec91a93
commit 6fd040d420
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -232,12 +232,14 @@ class CategoryController extends Controller
$start = null;
$end = null;
$periods = new Collection;
echo '12';
// prep for "all" view.
if ($moment === 'all') {
$subTitle = trans('firefly.all_journals_for_category', ['name' => $category->name]);
$start = $repository->firstUseDate($category);
$first = $repository->firstUseDate($category);
$start = is_null($first) ? new Carbon : $first;
$end = new Carbon;
}