From 97fb339325e8f52da43f865295024feaf3447a9a Mon Sep 17 00:00:00 2001 From: Roberto Guido Date: Sat, 4 May 2024 18:27:36 +0200 Subject: [PATCH] =?UTF-8?q?sommario=20fix=20per=20prodotto=20prenotati=20m?= =?UTF-8?q?a=20non=20pi=C3=B9=20nell'ordine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/app/BookedProduct.php | 8 +++++++- code/config/queue.php | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) 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', ],