diff --git a/composer.json b/composer.json index 38bdda1..c3bc88d 100755 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "require": { "php": ">=5.4.0", "illuminate/support": "~5.0|~5.1", - "guzzlehttp/guzzle": "~5.0" + "guzzlehttp/guzzle": "~6.0" }, "autoload": { "psr-0": { diff --git a/src/Cyberduck/LaravelWpApi/WpApi.php b/src/Cyberduck/LaravelWpApi/WpApi.php index ad1c239..05f697c 100755 --- a/src/Cyberduck/LaravelWpApi/WpApi.php +++ b/src/Cyberduck/LaravelWpApi/WpApi.php @@ -83,7 +83,7 @@ public function _get($method, array $query = array()) $response = $this->client->get($this->endpoint . $method, $query); $return = [ - 'results' => $response->json(), + 'results' => json_decode($response->getBody()), 'total' => $response->getHeader('X-WP-Total'), 'pages' => $response->getHeader('X-WP-TotalPages') ];