Skip to content

Commit 3595a18

Browse files
vernardHanmac
authored andcommitted
Fix invalid XML when UPS returns "Too Many Requests" error
1 parent b3b4ed0 commit 3595a18

File tree

1 file changed

+1
-0
lines changed
  • app/code/core/Mage/Usa/Model/Shipping/Carrier

1 file changed

+1
-0
lines changed

app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,7 @@ protected function _parseXmlResponse($xmlResponse)
848848
$costArr = [];
849849
$priceArr = [];
850850
if (strlen(trim($xmlResponse)) > 0) {
851+
$xmlResponse = str_replace('<?xmlversion="1.0"?>', '<?xml version="1.0"?>', $xmlResponse);
851852
$xml = new Varien_Simplexml_Config();
852853
$xml->loadString($xmlResponse);
853854
$arr = $xml->getXpath('//RatingServiceSelectionResponse/Response/ResponseStatusCode/text()');

0 commit comments

Comments
 (0)