add null checks to target
This commit is contained in:
@@ -31,10 +31,10 @@ class CheckoutLicenseMail extends Mailable
|
||||
$this->target = $checkedOutTo;
|
||||
|
||||
if($this->target instanceof User){
|
||||
$this->target = $this->target->present()->fullName();
|
||||
$this->target = $this->target->present()?->fullName();
|
||||
}
|
||||
elseif($this->target instanceof Asset){
|
||||
$this->target = $this->target->assignedto->present()->fullName();
|
||||
$this->target = $this->target->assignedto?->present()?->fullName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user