Fix empty title.

This commit is contained in:
James Cole 2018-02-11 20:45:48 +01:00
parent c2da5931ec
commit f674df4422
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -81,13 +81,14 @@ Breadcrumbs::register(
$breadcrumbs->parent('accounts.index', $what);
$breadcrumbs->push($account->name, route('accounts.show', [$account->id]));
$title = trans(
'firefly.between_dates_breadcrumb',
['start' => $start ? $start->formatLocalized(strval(trans('config.month_and_day'))) : '',
'end' => $end ? $end->formatLocalized(strval(trans('config.month_and_day'))) : '',]
);
$breadcrumbs->push($title, route('accounts.show', $account));
if (!is_null($start) && !is_null($end)) {
$title = trans(
'firefly.between_dates_breadcrumb',
['start' => $start ? $start->formatLocalized(strval(trans('config.month_and_day'))) : '',
'end' => $end ? $end->formatLocalized(strval(trans('config.month_and_day'))) : '',]
);
$breadcrumbs->push($title, route('accounts.show', $account));
}
}
);