diff --git a/composer.json b/composer.json index 572aa34..03dd9b4 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ "php": ">=5.3.0", "illuminate/support": "4.x", "guzzle/guzzle": "~3.7", - "doctrine/inflector": "1.0.*@dev" + "doctrine/inflector": "1.0.*@dev", + "mockery/mockery": "dev-master" }, "require-dev": { "phpdocumentor/phpdocumentor": "dev-develop", diff --git a/src/Indatus/ActiveResource/ActiveResource.php b/src/Indatus/ActiveResource/ActiveResource.php index bffbf1b..6ad9f72 100644 --- a/src/Indatus/ActiveResource/ActiveResource.php +++ b/src/Indatus/ActiveResource/ActiveResource.php @@ -1294,10 +1294,10 @@ function (\Guzzle\Common\Event $event) { //get the errors and set them $response = self::parseResponseStringToObject($event['response']->getBody(true)); if (property_exists($response, 'errors')) { - return new ActiveResourceRawResponse(false, $result, $response->errors); + return new ActiveResourceRawResponse(false, $response, $response->errors); } - return new ActiveResourceRawResponse(false, $result); + return new ActiveResourceRawResponse(false, $response); } } ); @@ -1326,7 +1326,7 @@ function (\Guzzle\Common\Event $event) { //get the errors and set them $result = self::parseResponseStringToObject($response->getBody(true)); if (property_exists($result, 'errors')) { - return new ActiveResourceRawResponse(false, $result, $response->errors); + return new ActiveResourceRawResponse(false, $result, $result->errors); } return new ActiveResourceRawResponse(false, $result);