3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-04 20:45:30 +00:00

Merge pull request #18272 from spencerrlongg/add-null-checks

Adds Null Checks
This commit is contained in:
snipe
2025-12-03 09:48:43 +00:00
committed by GitHub

View File

@ -43,8 +43,8 @@ class Checkoutable
$name = optional($unaccepted_row->present())->nameUrl() ?? '';
}
if($unaccepted_row instanceof LicenseSeat){
$category = optional($unaccepted_row->license->category?->present())->nameUrl() ?? '';
$company = optional($unaccepted_row->license->company?->present())?->nameUrl() ?? '';
$category = optional($unaccepted_row->license?->category?->present())->nameUrl() ?? '';
$company = optional($unaccepted_row->license?->company?->present())?->nameUrl() ?? '';
$model = '';
$name = $unaccepted_row->license->present()->nameUrl() ?? '';
}