From bf88cd8233ba3fdfcee17143aec096607d369f1c Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Wed, 13 Jul 2016 00:03:23 -0400 Subject: [PATCH] Check for variables to exist and not null rather than assuming it does. Fixes #2247. (#2248) --- app/Http/Controllers/ConsumablesController.php | 2 -- resources/views/emails/accept-asset.blade.php | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/ConsumablesController.php b/app/Http/Controllers/ConsumablesController.php index f75d28a560..9cdc284aa6 100644 --- a/app/Http/Controllers/ConsumablesController.php +++ b/app/Http/Controllers/ConsumablesController.php @@ -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(); diff --git a/resources/views/emails/accept-asset.blade.php b/resources/views/emails/accept-asset.blade.php index e5668b4ae6..62c7bac459 100755 --- a/resources/views/emails/accept-asset.blade.php +++ b/resources/views/emails/accept-asset.blade.php @@ -15,7 +15,7 @@ {{ $item_name }} - @if ($item_tag) + @if isset($item_tag) Asset Tag: @@ -25,7 +25,7 @@ @endif - @if ($item_serial) + @if isset($item_serial) Serial: @@ -43,7 +43,7 @@ {{ $checkout_date }} - @if ($expected_checkin) + @if isset($expected_checkin) Expected Checkin Date: @@ -53,7 +53,7 @@ @endif - @if ($note) + @if isset($note) Additional Notes: