Closed ValCanBuild closed 3 years ago
Fixed in v1.5.1 https://github.com/mailjet/mailjet-apiv3-php/commit/7b94fa629d46fa5ba3826ed4596674942944520d
You need to update your composer deps
@uavn I use the laravel-mailjet plugin - anychance that can get updated to use this version as well?
@ValCanBuild just update your laravel composer dependencies, it will download 1.5.1:
root@0181498cd37a:/var/www/mailjet/laravel-mailjet# php composer.phar up
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 30 updates, 0 removals
- Upgrading fzaninotto/faker (v1.9.1 => v1.9.2)
- Upgrading mailjet/mailjet-apiv3-php (v1.5.0 => v1.5.1)
Whenever I try to do any API call I get a
json_decode
error inResponse.php
It's because of the
decodeBody
line here$response->getBody()
here is aGuzzleHttp\Psr7\Stream
and thedecodeBody
function passes it straight intojson_decode
which expects a string instead. This reuslts in ajson_decode() expects parameter 1 to be string, object given
error.I'm using the latest version of the https://github.com/mailjet/laravel-mailjet library which I assume is using the latest version of this one. Are my settings wrong or does the library just need a string cast?