mirror of
https://github.com/SkillDisplay/PHPToolKit.git
synced 2024-11-16 22:06:08 +01:00
Merge pull request #8 from DanielSiepmann/bugfix/type-missmatch-for-campaigns-api
Allow json decode of received campaigns response
This commit is contained in:
commit
2977ee8781
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ class Campaigns
|
|||
if ($result->getStatusCode() !== 200) {
|
||||
throw new \Exception('API key or user invalid.', 1605878128);
|
||||
}
|
||||
$body = json_decode($result->getBody(), true);
|
||||
$body = json_decode((string) $result->getBody(), true);
|
||||
$campaigns = [];
|
||||
foreach ($body['Campaigns'] as $campaign) {
|
||||
$campaigns[] = new Campaign($campaign, $this->settings);
|
||||
|
|
Loading…
Reference in a new issue