This PHP7 thing is strict!

This commit is contained in:
James Cole 2016-02-05 19:57:17 +01:00
parent c3f78b698d
commit 9465a6d2b5
2 changed files with 3 additions and 3 deletions

View File

@ -97,7 +97,7 @@ class BudgetLine
*/ */
public function getRepetition(): LimitRepetition public function getRepetition(): LimitRepetition
{ {
return $this->repetition; return $this->repetition ?? new LimitRepetition;
} }
/** /**

View File

@ -26,12 +26,12 @@
{% endif %} {% endif %}
</td> </td>
<td> <td>
{% if budgetLine.getRepetition %} {% if budgetLine.getRepetition.id %}
<a href="{{ route('budgets.show', [budgetLine.getBudget.id, budgetLine.getRepetition.id]) }}">{{ budgetLine.getRepetition.startdate.formatLocalized(monthAndDayFormat) }}</a> <a href="{{ route('budgets.show', [budgetLine.getBudget.id, budgetLine.getRepetition.id]) }}">{{ budgetLine.getRepetition.startdate.formatLocalized(monthAndDayFormat) }}</a>
{% endif %} {% endif %}
</td> </td>
<td> <td>
{% if budgetLine.getRepetition %} {% if budgetLine.getRepetition.id %}
{{ budgetLine.getRepetition.amount|formatAmount }} {{ budgetLine.getRepetition.amount|formatAmount }}
{% else %} {% else %}
{{ 0|formatAmount }} {{ 0|formatAmount }}