diff --git a/resources/views/users/print.blade.php b/resources/views/users/print.blade.php index baba88b5fb..7fe92303b3 100644 --- a/resources/views/users/print.blade.php +++ b/resources/views/users/print.blade.php @@ -236,7 +236,7 @@ @foreach ($show_user->licenses as $license) @php - if ($license->category->getEula()) $eulas[] = $license->category->getEula() + if (($license->category) && ($license->category->getEula())) $eulas[] = $license->category->getEula() @endphp {{ $lcounter }} @@ -294,7 +294,7 @@ @foreach ($show_user->accessories as $accessory) @if ($accessory) @php - if ($accessory->category->getEula()) $eulas[] = $accessory->category->getEula() + if (($accessory->category) && ($accessory->category->getEula())) $eulas[] = $accessory->category->getEula() @endphp {{ $acounter }} @@ -357,7 +357,7 @@ @foreach ($show_user->consumables as $consumable) @if ($consumable) @php - if ($consumable->category->getEula()) $eulas[] = $consumable->category->getEula() + if (($consumable->category) && ($consumable->category->getEula())) $eulas[] = $consumable->category->getEula() @endphp {{ $ccounter }}