Skip to content

Commit

Permalink
Fixed bug that occurs when retrieving offer list with only one offer
Browse files Browse the repository at this point in the history
Fixes issue Cdiscount#62
  • Loading branch information
fgiorgio committed Dec 30, 2019
1 parent f4a509a commit dd28033
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public function __construct($response)
{
$reader = new \Zend\Config\Reader\Xml();
$this->_dataResponse = $reader->fromString($response);
$offerList=$this->_dataResponse['s:Body']['GetOfferListPaginatedResponse']['GetOfferListPaginatedResult']['OfferList'];
if(isset($offerList['Offer']['CreationDate'])) {
$this->_dataResponse['s:Body']['GetOfferListPaginatedResponse']['GetOfferListPaginatedResult']['OfferList']['Offer']=[$offerList['Offer']];
}
$this->_offerList = array();
}

Expand Down

0 comments on commit dd28033

Please sign in to comment.