EDIT:
This problem is not necessarily specific to the goal you are trying to achieve.
Although, there is definitely a bug in our wrapper 1.0.6. In the shell code, we use the 4th parameter of the json_decode() function, which was introduced only in PHP 5.4 (see the Changelog section here ).
Two ways to solve this problem:
- Or upgrade your PHP version to> = 5.4
- Or (until we present a fix on our side), change the shell locally so as not to use this option (see here ) , which can very well bring new problems and is not a recommended fix .
Hope this helps. We are certainly grateful that this attracted attention to this issue :)
Edit2:
To clarify, here is what the second approach means in terms of code:
$this->_response = json_decode($buffer, false, 512, JSON_BIGINT_AS_STRING); //Becomes $this->_response = json_decode($buffer, false, 512);
This should fix the warning and resolve the problem. Is not that great?!; -)
Since I really cannot reproduce your problem at my end, here is the question:
Is the contact you are trying to create indicated in the answer when releasing the following code?
Alternatively, go here for your accountโs contact list.
$mj = new Mailjet($apiKey, $secretKey); $contact = $mj->contact(); var_dump($contact);
If so, that is why what I wrote in the answer to your other question does not work.
But why?
Well, you are trying to create a contact that is already listed in your account. The process of creating a contact does not necessarily mean that it must be assigned to the contact list.
Correction
Or get the existing contact identifier, rather than create it before adding it to the list:
$mj = new Mailjet($apiKey, $secretKey); $viewContact = [ "method" => "VIEW", "unique" => " gaetan.philippot@gmail.com " ]; $contact = $mj->contact($viewContact); echo "Contact ID: ".$contact->Data[0]->ID."\n";
Or delete it through the web interface and repeat my answer again.
(Click on the contact email address, then click on the yellow menu next to his avatar and click on delete.)
Does your problem solve? :-)