fix: avoid issues with invalid hotel data
This commit is contained in:
@@ -344,7 +344,10 @@ class DateService implements SingletonInterface
|
||||
if (!$row['hotelShowAsTeaser']) {
|
||||
continue;
|
||||
}
|
||||
$categoryUid = $row['hotelCategory'] ?? Hotel::CATEGORY_STANDARD;
|
||||
// Set default hotel category to avoid issues with invalid data
|
||||
if (0 === $categoryUid = (int)$row['hotelCategory']) {
|
||||
$categoryUid = Hotel::CATEGORY_STANDARD;
|
||||
}
|
||||
$hotelUid = $row['hotelUid'];
|
||||
$hotelUri = $this->uriBuilder
|
||||
->reset()
|
||||
|
||||
Reference in New Issue
Block a user