mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-24 22:19:58 +05:30
Merge pull request #739 from jk2K/patch-1
fix Stream argument 1 type is wrong
This commit is contained in:
commit
28278da6a6
@ -126,7 +126,7 @@ $app->get('/authorize', function (ServerRequestInterface $request, ResponseInter
|
|||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
|
|
||||||
// Unknown exception
|
// Unknown exception
|
||||||
$body = new Stream('php://temp', 'r+');
|
$body = new Stream(fopen('php://temp', 'r+'));
|
||||||
$body->write($exception->getMessage());
|
$body->write($exception->getMessage());
|
||||||
return $response->withStatus(500)->withBody($body);
|
return $response->withStatus(500)->withBody($body);
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ $app->post('/access_token', function (ServerRequestInterface $request, ResponseI
|
|||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
|
|
||||||
// Unknown exception
|
// Unknown exception
|
||||||
$body = new Stream('php://temp', 'r+');
|
$body = new Stream(fopen('php://temp', 'r+'));
|
||||||
$body->write($exception->getMessage());
|
$body->write($exception->getMessage());
|
||||||
return $response->withStatus(500)->withBody($body);
|
return $response->withStatus(500)->withBody($body);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user