Skip to content

Commit 476bf95

Browse files
authored
Merge pull request #18272 from spencerrlongg/add-null-checks
Adds Null Checks
2 parents cdf036e + aa57687 commit 476bf95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Models/Checkoutable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public static function fromAcceptance(CheckoutAcceptance $unaccepted): self
4343
$name = optional($unaccepted_row->present())->nameUrl() ?? '';
4444
}
4545
if($unaccepted_row instanceof LicenseSeat){
46-
$category = optional($unaccepted_row->license->category?->present())->nameUrl() ?? '';
47-
$company = optional($unaccepted_row->license->company?->present())?->nameUrl() ?? '';
46+
$category = optional($unaccepted_row->license?->category?->present())->nameUrl() ?? '';
47+
$company = optional($unaccepted_row->license?->company?->present())?->nameUrl() ?? '';
4848
$model = '';
4949
$name = $unaccepted_row->license->present()->nameUrl() ?? '';
5050
}

0 commit comments

Comments
 (0)