From 0ca668f7ff49547eeb8d858469b29f8a7d3f089d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 4 Aug 2022 16:41:56 +1000 Subject: [PATCH] Fixes for null contact --- app/Services/Payment/SendEmail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Payment/SendEmail.php b/app/Services/Payment/SendEmail.php index 39c3e063f7fc..be7326098c9c 100644 --- a/app/Services/Payment/SendEmail.php +++ b/app/Services/Payment/SendEmail.php @@ -36,7 +36,7 @@ class SendEmail $contact = $this->payment->client->contacts()->first(); - if ($contact->email) + if ($contact?->email) EmailPayment::dispatch($this->payment, $this->payment->company, $contact); }