Skip to content

Commit 2977ee8

Browse files
authored
Merge pull request #8 from DanielSiepmann/bugfix/type-missmatch-for-campaigns-api
Allow json decode of received campaigns response
2 parents adec8fd + 4741df6 commit 2977ee8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Api/Campaigns.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function getForUser(): array
7171
if ($result->getStatusCode() !== 200) {
7272
throw new \Exception('API key or user invalid.', 1605878128);
7373
}
74-
$body = json_decode($result->getBody(), true);
74+
$body = json_decode((string) $result->getBody(), true);
7575
$campaigns = [];
7676
foreach ($body['Campaigns'] as $campaign) {
7777
$campaigns[] = new Campaign($campaign, $this->settings);

0 commit comments

Comments
 (0)