Index: modules/in-commerce/units/helpers/bank_lv_currency_rates.php =================================================================== --- modules/in-commerce/units/helpers/bank_lv_currency_rates.php +++ modules/in-commerce/units/helpers/bank_lv_currency_rates.php @@ -28,9 +28,14 @@ /** @var kCurlHelper $curl_helper */ $curl_helper = $this->Application->recallObject('CurlHelper'); + $curl_helper->followLocation = true; $xml = $curl_helper->Send($this->RateSource); + if ( !$curl_helper->isGoodResponseCode() || strlen($xml) == 0 ) { + return; + } + xml_parse_into_struct($xml_parser, $xml, $struct, $index); $data_res = Array(); $currency = ''; Index: modules/in-commerce/units/helpers/ecb_currency_rates.php =================================================================== --- modules/in-commerce/units/helpers/ecb_currency_rates.php +++ modules/in-commerce/units/helpers/ecb_currency_rates.php @@ -17,7 +17,7 @@ public function __construct() { - $this->RateSource = 'http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml'; + $this->RateSource = 'http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml'; parent::__construct(); } @@ -28,9 +28,14 @@ /** @var kCurlHelper $curl_helper */ $curl_helper = $this->Application->recallObject('CurlHelper'); + $curl_helper->followLocation = true; $xml = $curl_helper->Send($this->RateSource); + if ( !$curl_helper->isGoodResponseCode() || strlen($xml) == 0 ) { + return; + } + xml_parse_into_struct($xml_parser, $xml, $struct, $index); $data_res = Array(); foreach($struct as $element) Index: modules/in-commerce/units/helpers/frny_currency_rates.php =================================================================== --- modules/in-commerce/units/helpers/frny_currency_rates.php +++ modules/in-commerce/units/helpers/frny_currency_rates.php @@ -26,6 +26,7 @@ { /** @var kCurlHelper $curl_helper */ $curl_helper = $this->Application->recallObject('CurlHelper'); + $curl_helper->followLocation = true; for($i = 0; $i < 10; $i++) { @@ -33,6 +34,10 @@ $source_file = sprintf($this->RateSource, adodb_date('Y-m-d', $time)); $xml = $curl_helper->Send($source_file); + if ( !$curl_helper->isGoodResponseCode() || strlen($xml) == 0 ) { + continue; + } + $xml_parser = xml_parser_create(); xml_parse_into_struct($xml_parser, $xml, $struct, $index); foreach($struct as $element)