diff --git a/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php b/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php index 077725de..6e22a50d 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php @@ -121,7 +121,7 @@ class ContingentImportService implements SingletonInterface { libxml_use_internal_errors (true); /** @var \SimpleXMLElement $xmlData */ - if (!$xmlData = simplexml_load_file($file)) { + if (!$xmlData = simplexml_load_string(file_get_contents($file))) { libxml_clear_errors(); return 0; } diff --git a/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php b/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php index 4c27c6e0..f0942248 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php @@ -171,8 +171,12 @@ class DateImportService implements SingletonInterface */ public function parseProductXmlFile($file) { + libxml_use_internal_errors (true); /** @var \SimpleXMLElement $xmlData */ - $xmlData = simplexml_load_file($file); + if (!$xmlData = simplexml_load_string(file_get_contents($file))) { + libxml_clear_errors(); + return 0; + } if ($xmlData->reise[0] === null) { return 0; @@ -798,14 +802,18 @@ class DateImportService implements SingletonInterface if (!array_key_exists($key, $list)) { $list[$key] = []; } - $list[$key] = array_merge($list[$key], $section); + $list[$key] += $section; } } protected function importPickups() { + libxml_use_internal_errors (true); $path = GeneralUtility::getFileAbsFileName('fileadmin/xmlexport/zustiege.xml'); - $xmlData = simplexml_load_file($path); + if (!$xmlData = simplexml_load_string(file_get_contents($path))) { + libxml_clear_errors(); + return; + } foreach ($xmlData->zustieg as $entry) {