mailjet/mailjet-apiv3-php

$response->success() is false when $response->getStatus() is 201

Closed this issue · 3 comments

When adding a contact to a list with ContactslistManagecontact, $response->success() is false but the contact is successfuly added as I can see it in the mailjet panel and $response->getStatus() is 201, why ?

Actually in Response.php $this->success is set like this :
$this->success = 2 === floor($this->status / 100);
And should be :
$this->success = 2 == floor($this->status / 100);
or
$this->success = 2. === floor($this->status / 100);
as floor($this->status / 100); is a float

I've made a pull request : #223

@chessterfi3ld thank you