From 7b88e20153f36360d9f7ba5e4a79318aaef73f05 Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Mon, 23 Mar 2020 20:21:48 +0530 Subject: [PATCH] Issue #2716 fixed --- ...23_201431_alter_booking_products_table.php | 32 +++++++++++++++++++ .../BookingProduct/src/Helpers/RentalSlot.php | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 packages/Webkul/BookingProduct/src/Database/Migrations/2020_03_23_201431_alter_booking_products_table.php diff --git a/packages/Webkul/BookingProduct/src/Database/Migrations/2020_03_23_201431_alter_booking_products_table.php b/packages/Webkul/BookingProduct/src/Database/Migrations/2020_03_23_201431_alter_booking_products_table.php new file mode 100644 index 000000000..170ae5796 --- /dev/null +++ b/packages/Webkul/BookingProduct/src/Database/Migrations/2020_03_23_201431_alter_booking_products_table.php @@ -0,0 +1,32 @@ +datetime('available_from')->change(); + + $table->datetime('available_to')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php b/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php index 352c30024..a6c82a26f 100644 --- a/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php +++ b/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php @@ -37,7 +37,7 @@ class RentalSlot extends Booking $timeDurations = $bookingProductSlot->same_slot_all_days ? $bookingProductSlot->slots - : $bookingProductSlot->slots[$requestedDate->format('w')]; + : $bookingProductSlot->slots[$requestedDate->format('w')] ?? []; if ($requestedDate < $availableFrom || $requestedDate > $availableTo