From cd19f117996b6cd29c971991f2d21d2700ac5355 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 17 Jan 2016 14:55:36 +0000 Subject: [PATCH] Fixed conversion to response object --- src/Exception/OAuthServerException.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Exception/OAuthServerException.php b/src/Exception/OAuthServerException.php index baf16f50..46a79c1a 100644 --- a/src/Exception/OAuthServerException.php +++ b/src/Exception/OAuthServerException.php @@ -243,9 +243,9 @@ class OAuthServerException extends \Exception $response = $response->withHeader($header, $content); } - return $response - ->withStatus($this->getHttpStatusCode()) - ->getBody()->write(json_encode($payload)); + $response = $response->withStatus($this->getHttpStatusCode()); + $response->getBody()->write(json_encode($payload)); + return $response; } /**