Return from Response::prepare() so that the method may be chained.
This commit is contained in:
parent
e7470ffebb
commit
a0d047b06f
@ -198,6 +198,8 @@ class Response
|
||||
* the Request that is "associated" with this Response.
|
||||
*
|
||||
* @param Request $request A Request instance
|
||||
*
|
||||
* @return Response The current response.
|
||||
*/
|
||||
public function prepare(Request $request)
|
||||
{
|
||||
@ -237,6 +239,8 @@ class Response
|
||||
$headers->set('Content-Length', $length);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,7 +82,7 @@ class StreamedResponse extends Response
|
||||
|
||||
$this->headers->set('Cache-Control', 'no-cache');
|
||||
|
||||
parent::prepare($request);
|
||||
return parent::prepare($request);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user