Skip to content

Commit 5241326

Browse files
committed
Fix getinfo method
1 parent 7424c37 commit 5241326

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Api.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,11 @@ public function getInfo($subscriberId, $subscriptionId = '')
338338
];
339339

340340
$response = $this->request('getinfo', $args);
341+
if (!isset($response['Message']) || !isset($response['Message']['Subscription'])) {
342+
throw new \RuntimeException('GetInfo response has no Message/Subscription data');
343+
}
344+
345+
$response = $response['Message']['Subscription'];
341346

342347
return new Subscription(
343348
$response['Status'],

0 commit comments

Comments
 (0)