Skip to content

Commit e4f8c3b

Browse files
committed
add null check and check for email
1 parent 3237a3b commit e4f8c3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Controllers/Account/AcceptanceController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function store(Request $request, $id) : RedirectResponse
216216
try {
217217
$recipient = User::find($acceptance->alert_on_response_id);
218218

219-
if ($recipient) {
219+
if ($recipient?->email) {
220220
Log::debug('Attempting to send email acceptance.');
221221
Mail::to($recipient)->send(new CheckoutAcceptanceResponseMail(
222222
$acceptance,

0 commit comments

Comments
 (0)