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:
Meng Ye 2017-05-17 10:30:38 +08:00 committed by GitHub
parent 9bf070472b
commit 2d7424b56e

View File

@ -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);
}