A free open source IT asset/license management system
Check for variables to exist and not null rather than assuming it does. Fixes #2247. (#2248)
Daniel Meltzerbf88cd8233ba
diff --git a/app/Http/Controllers/ConsumablesController.php b/app/Http/Controllers/ConsumablesController.phpindex 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.phpindex e5668b4ae6..62c7bac459 100755--- a/resources/views/emails/accept-asset.blade.php+++ b/resources/views/emails/accept-asset.blade.php@@ -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: