Skip to content

Commit 6db4099

Browse files
committed
Change: Throw an exception if API response is empty
1 parent 23a0df5 commit 6db4099

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Checkdomain/TeleCash/IPG/API/Service/OrderService.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ private function soapCall(AbstractRequest $payload)
9595
throw new \Exception($this->getErrorMessage());
9696
}
9797

98+
if (empty($response)) {
99+
throw new \Exception('Empty API response received');
100+
}
101+
98102
$responseDoc = new \DOMDocument('1.0', 'UTF-8');
99103
$responseDoc->loadXML($response);
100104

0 commit comments

Comments
 (0)