diff --git a/code/app/BookedProduct.php b/code/app/BookedProduct.php index f8423f79..21870eb7 100644 --- a/code/app/BookedProduct.php +++ b/code/app/BookedProduct.php @@ -100,7 +100,13 @@ private function fixQuantity($attribute, $rectify) $content = 0; } - return $this->product->getPrice($rectify) * $content; + if ($this->product) { + return $this->product->getPrice($rectify) * $content; + } + else { + \Log::error('Prodotto non trovato: ' . $this->product_id . ' - ' . $this->booking->order_id); + return 0; + } } } diff --git a/code/config/queue.php b/code/config/queue.php index 25cbea4e..0172edc8 100644 --- a/code/config/queue.php +++ b/code/config/queue.php @@ -83,6 +83,7 @@ */ 'failed' => [ + 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ],