diff --git a/code/app/Jobs/NotifyRemindOrder.php b/code/app/Jobs/NotifyRemindOrder.php index 458543ec..9140fa2b 100644 --- a/code/app/Jobs/NotifyRemindOrder.php +++ b/code/app/Jobs/NotifyRemindOrder.php @@ -31,6 +31,11 @@ public function handle() foreach($this->orders_id as $order_id) { $order = Order::find($order_id); + if (is_null($order)) { + \Log::error('Ordine non trovato per notifica reminder: ' . $order_id . ', ' . $gas->id); + continue; + } + $users = $order->notifiableUsers($gas); foreach($users as $user) {