Fix PHP warning on order detail page

This commit is contained in:
Abhishek Kumar
2024-05-01 15:52:14 +05:30
parent 8dcfc9e892
commit edca9fb6f6

View File

@@ -187,13 +187,14 @@ class QloHotelReview extends Module
if (QhrHotelReviewHelper::getIsReviewable($idOrder)
&& !QhrHotelReview::getByIdOrder($idOrder)
) {
$hotel = QhrHotelReviewHelper::getHotelByOrder($idOrder);
$this->smarty->assign(array(
'id_order' => (int) $idOrder,
'id_hotel' => $hotel['id_hotel'],
'hotel_name' => $hotel['hotel_name'],
));
return $this->display(__FILE__, 'booking-action.tpl');
if ($hotel = QhrHotelReviewHelper::getHotelByOrder($idOrder)) {
$this->smarty->assign(array(
'id_order' => (int) $idOrder,
'id_hotel' => $hotel['id_hotel'],
'hotel_name' => $hotel['hotel_name'],
));
return $this->display(__FILE__, 'booking-action.tpl');
}
}
}