Skip to content

Commit 63b82fc

Browse files
committed
Merge pull request #17 from johnny-bit/data_early_bail
Instead of early bailout, try to process all possible response nodes.… thx @johnny-bit
2 parents 69c0374 + fb9be64 commit 63b82fc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/AfriCC/EPP/Frame/Response.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ public function data()
8484
{
8585
$nodes = $this->get('//epp:epp/epp:response/epp:resData');
8686
if ($nodes === false || !($nodes instanceof DOMNodeList) || $nodes->length === 0 || !$nodes->item(0)->hasChildNodes()) {
87-
return;
87+
$data = [];
88+
} else {
89+
$data = $this->nodeToArray($nodes->item(0));
8890
}
8991

90-
$data = $this->nodeToArray($nodes->item(0));
91-
9292
// check for extension data
9393
$nodes = $this->get('//epp:epp/epp:response/epp:extension');
9494
if ($nodes !== false && $nodes instanceof DOMNodeList && $nodes->length > 0 && $nodes->item(0)->hasChildNodes()) {

0 commit comments

Comments
 (0)