Skip to content

Commit

Permalink
Merge pull request #17 from johnny-bit/data_early_bail
Browse files Browse the repository at this point in the history
Instead of early bailout, try to process all possible response nodes.… thx @johnny-bit
  • Loading branch information
lifeofguenter committed Nov 30, 2015
2 parents 69c0374 + fb9be64 commit 63b82fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/AfriCC/EPP/Frame/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ public function data()
{
$nodes = $this->get('//epp:epp/epp:response/epp:resData');
if ($nodes === false || !($nodes instanceof DOMNodeList) || $nodes->length === 0 || !$nodes->item(0)->hasChildNodes()) {
return;
$data = [];
} else {
$data = $this->nodeToArray($nodes->item(0));
}

$data = $this->nodeToArray($nodes->item(0));

// check for extension data
$nodes = $this->get('//epp:epp/epp:response/epp:extension');
if ($nodes !== false && $nodes instanceof DOMNodeList && $nodes->length > 0 && $nodes->item(0)->hasChildNodes()) {
Expand Down

0 comments on commit 63b82fc

Please sign in to comment.