From 7c5fd86a5caeb14640257514a7399631d269d202 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Thu, 22 Oct 2026 16:41:29 +0530 Subject: [PATCH] Fixed: undefined array key "children" on admin Book Now page with malformed occupancy URL --- .../admin/AdminHotelRoomsBookingController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php index e30865d0c..2c6a9795e 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php @@ -171,9 +171,16 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $occupancy = Tools::getValue('occupancy'); if (!Validate::isOccupancy($occupancy)) { $occupancy = array(); + } else { + foreach ($occupancy as &$roomOccupancy) { + if (is_array($roomOccupancy) && !isset($roomOccupancy['children'])) { + $roomOccupancy['children'] = 0; + } + } + unset($roomOccupancy); } - $this->id_cart = (int) $this->context->cart->id; + $this->id_cart =(int) $this->context->cart->id; $this->id_guest = (int) $this->context->cookie->id_guest; $this->id_hotel = $id_hotel; $this->id_room_type = $id_room_type;