Skip to content

Commit

Permalink
Merge branch 'release/3.0.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojciech Brozyna committed Mar 7, 2021
2 parents 6c10d50 + 568c1fd commit 6201df4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions src/service/TrackingService/TrackingResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,8 @@ private function setConsignments()

$this->consignments = [];

if (is_array($this->simpleXml->Consignment) === true) {
foreach ($this->simpleXml->Consignment as $cs) {
$this->consignments[] = new Consignment($cs);
}
} else {
$this->consignments[] = new Consignment($this->simpleXml->Consignment);
foreach ($this->simpleXml->Consignment as $cs) {
$this->consignments[] = new Consignment($cs);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/service/TrackingService/TrackingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ private function continueRequest($output)
return false;
}

$xml = new \SimpleXMLElement($output);

if (isset($xml->ContinuationKey) === true) {
$xml = simplexml_load_string($output);
if ($xml !== false && isset($xml->ContinuationKey) === true) {
$this->xml->writeElement('ContinuationKey', $xml->ContinuationKey);

return true;
Expand Down

0 comments on commit 6201df4

Please sign in to comment.