Check for valid eula for license, consumable
Some checks failed
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Has been cancelled
Codacy Security Scan / Codacy Security Scan (push) Has been cancelled
Docker images (Alpine) / docker (push) Has been cancelled
Docker images / docker (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Has been cancelled
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Has been cancelled

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-09-27 14:07:30 +01:00
parent 166a700342
commit d120585f94

View file

@ -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
<tr>
<td>{{ $lcounter }}</td>
@ -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
<tr>
<td>{{ $acounter }}</td>
@ -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
<tr>
<td>{{ $ccounter }}</td>