mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-24 05:59:48 +05:30
fix Stream argument 1 type is wrong
fix Argument 1 (stream) is string but \GuzzleHttp\Psr7\Stream::__construct() takes resource defined
This commit is contained in:
parent
9bf070472b
commit
2d7424b56e
@ -126,7 +126,7 @@ $app->get('/authorize', function (ServerRequestInterface $request, ResponseInter
|
||||
} catch (\Exception $exception) {
|
||||
|
||||
// Unknown exception
|
||||
$body = new Stream('php://temp', 'r+');
|
||||
$body = new Stream(fopen('php://temp', 'r+'));
|
||||
$body->write($exception->getMessage());
|
||||
return $response->withStatus(500)->withBody($body);
|
||||
|
||||
@ -152,7 +152,7 @@ $app->post('/access_token', function (ServerRequestInterface $request, ResponseI
|
||||
} catch (\Exception $exception) {
|
||||
|
||||
// Unknown exception
|
||||
$body = new Stream('php://temp', 'r+');
|
||||
$body = new Stream(fopen('php://temp', 'r+'));
|
||||
$body->write($exception->getMessage());
|
||||
return $response->withStatus(500)->withBody($body);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user