Check for variables to exist and not null rather than assuming it does. Fixes #2247. (#2248)

This commit is contained in:
Daniel Meltzer 2016-07-13 00:03:23 -04:00 committed by snipe
parent 7a4cbce460
commit bf88cd8233
2 changed files with 4 additions and 6 deletions

View file

@ -366,8 +366,6 @@ class ConsumablesController extends Controller
$data['first_name'] = $user->first_name;
$data['item_name'] = $consumable->name;
$data['checkout_date'] = $logaction->created_at;
$data['item_tag'] = '';
$data['expected_checkin'] = '';
$data['note'] = $logaction->note;
$data['require_acceptance'] = $consumable->requireAcceptance();

View file

@ -15,7 +15,7 @@
<strong>{{ $item_name }}</strong>
</td>
</tr>
@if ($item_tag)
@if isset($item_tag)
<tr>
<td>
Asset Tag:
@ -25,7 +25,7 @@
</td>
</tr>
@endif
@if ($item_serial)
@if isset($item_serial)
<tr>
<td>
Serial:
@ -43,7 +43,7 @@
<strong>{{ $checkout_date }}</strong>
</td>
</tr>
@if ($expected_checkin)
@if isset($expected_checkin)
<tr>
<td>
Expected Checkin Date:
@ -53,7 +53,7 @@
</td>
</tr>
@endif
@if ($note)
@if isset($note)
<tr>
<td>
Additional Notes: