1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Wrap @foreach in conditional

If $invoiceLabels was not set, an invalid argument error was being
thrown on the page “/company/advanced_settings/invoice_design”
This commit is contained in:
Ben Cole 2015-05-29 10:57:03 -07:00
parent 9ffcf9f3ef
commit 3014a22849

View File

@ -85,9 +85,11 @@
{!! Former::populate($account) !!}
{!! Former::populateField('hide_quantity', intval($account->hide_quantity)) !!}
{!! Former::populateField('hide_paid_to_date', intval($account->hide_paid_to_date)) !!}
@if ($invoiceLabels)
@foreach ($invoiceLabels as $field => $value)
{!! Former::populateField("labels_{$field}", $value) !!}
@endforeach
@endif
<div class="panel panel-default">
<div class="panel-heading">