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['first_name'] = $user->first_name;
$data['item_name'] = $consumable->name; $data['item_name'] = $consumable->name;
$data['checkout_date'] = $logaction->created_at; $data['checkout_date'] = $logaction->created_at;
$data['item_tag'] = '';
$data['expected_checkin'] = '';
$data['note'] = $logaction->note; $data['note'] = $logaction->note;
$data['require_acceptance'] = $consumable->requireAcceptance(); $data['require_acceptance'] = $consumable->requireAcceptance();

View file

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