Skip to content

A free open source IT asset/license management system

Fix cc email silently failing

Marcus Moore34068406fe68
diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php
index 39b9479e00..618b1eec12 100644
--- a/app/Listeners/CheckoutableListener.php
+++ b/app/Listeners/CheckoutableListener.php
@@ -105,7 +105,7 @@ class CheckoutableListener
if (! empty($to)) {
try {
- $toMail = (clone $mailable)->locale($notifiable->locale);
+ $toMail = (clone $mailable)->locale($notifiable?->locale);
Mail::to(array_flatten($to))->send($toMail);
Log::info('Checkout Mail sent to checkout target');
} catch (ClientException $e) {
@@ -203,7 +203,7 @@ class CheckoutableListener
if (! empty($to)) {
try {
- $toMail = (clone $mailable)->locale($notifiable->locale);
+ $toMail = (clone $mailable)->locale($notifiable?->locale);
Mail::to(array_flatten($to))->send($toMail);
Log::info('Checkin Mail sent to checkin target');
} catch (ClientException $e) {