Skip to content

Commit d4ca655

Browse files
committed
Handle OpenSRS modify response without details
1 parent 0d51150 commit d4ca655

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Domains/Registrar/Adapter/OpenSRS.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,13 @@ public function updateDomain(string $domain, UpdateDetails $details): bool
626626
$result = $this->send($message);
627627
$result = $this->sanitizeResponse($result);
628628
$elements = $result->xpath($xpath);
629+
if (empty($elements)) {
630+
$elements = $result->xpath('//body/data_block/dt_assoc/item[@key="is_success"]');
631+
}
632+
633+
if (empty($elements)) {
634+
throw new DomainsException('Failed to update domain: invalid response from OpenSRS', 500);
635+
}
629636

630637
return (string) $elements[0] === '1';
631638
}

0 commit comments

Comments
 (0)