Fix immutability issues

This commit is contained in:
Alex Bilbie 2016-01-15 18:32:53 +00:00
parent e9f8e7ac19
commit 8f724bb720

View File

@ -226,14 +226,12 @@ class OAuthServerException extends \Exception
} }
foreach ($headers as $header => $content) { foreach ($headers as $header => $content) {
$response->withHeader($header, $content); $response = $response->withHeader($header, $content);
} }
$response return $response
->withStatus($this->getHttpStatusCode()) ->withStatus($this->getHttpStatusCode())
->getBody()->write(json_encode($payload)); ->getBody()->write(json_encode($payload));
return $response;
} }
/** /**