Fix contingent import crashing due to missing room type
This commit is contained in:
@@ -271,6 +271,9 @@ class ContingentImportService implements SingletonInterface, LoggerAwareInterfac
|
|||||||
$roomTypeBusProId = $roomType['link'] ?: $roomType['idBusPro'];
|
$roomTypeBusProId = $roomType['link'] ?: $roomType['idBusPro'];
|
||||||
$xpath = sprintf('zimmerliste/zimmer[@idbuspro="%d"]', $roomTypeBusProId);
|
$xpath = sprintf('zimmerliste/zimmer[@idbuspro="%d"]', $roomTypeBusProId);
|
||||||
$xmlRoom = $xmlDate->xpath($xpath)[0];
|
$xmlRoom = $xmlDate->xpath($xpath)[0];
|
||||||
|
if (null === $xmlRoom) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$this->calculateContingent($xmlRoom, $roomType, $date, $hotelData);
|
$this->calculateContingent($xmlRoom, $roomType, $date, $hotelData);
|
||||||
}
|
}
|
||||||
$dateCount++;
|
$dateCount++;
|
||||||
|
|||||||
Reference in New Issue
Block a user