diff --git a/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php b/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php index be19c903..36317548 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php @@ -143,6 +143,9 @@ class ContingentImportService implements SingletonInterface, LoggerAwareInterfac public function loadXmlFile($file): ?\SimpleXMLElement { libxml_use_internal_errors (true); + if (!file_exists($file)) { + return null; + } /** @var \SimpleXMLElement $xmlData */ if (!$xmlData = simplexml_load_string(file_get_contents($file))) { libxml_clear_errors(); @@ -210,7 +213,9 @@ class ContingentImportService implements SingletonInterface, LoggerAwareInterfac if ($xmlContingent->idbuspro_kontingent_aus) { $linkedProductId = (int)$xmlContingent->idbuspro_kontingent_aus; $path = GeneralUtility::getFileAbsFileName(self::XML_PATH); - $xmlContingent = $this->loadXmlFile(sprintf('%s/HotelZimmer_%d.xml', $path, $linkedProductId)); + if (null === $xmlContingent = $this->loadXmlFile(sprintf('%s/HotelZimmer_%d.xml', $path, $linkedProductId))) { + return 0; + } } if (empty($xmlContingent->kapazitaeten)) {