mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Added argument checking to Controller::handleRequest()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60377 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5988ca478f
commit
3574d3c3b6
@ -51,7 +51,9 @@ class Controller extends RequestHandlingData {
|
|||||||
* Handles HTTP requests.
|
* Handles HTTP requests.
|
||||||
* @param $request The {@link HTTPRequest} object that is responsible for distributing request parsing.
|
* @param $request The {@link HTTPRequest} object that is responsible for distributing request parsing.
|
||||||
*/
|
*/
|
||||||
function handleRequest($request) {
|
function handleRequest(HTTPRequest $request) {
|
||||||
|
if(!$request) user_error("Controller::handleRequest() not passed a request!", E_USER_ERROR);
|
||||||
|
|
||||||
$this->pushCurrent();
|
$this->pushCurrent();
|
||||||
$this->urlParams = $request->allParams();
|
$this->urlParams = $request->allParams();
|
||||||
$this->response = new HTTPResponse();
|
$this->response = new HTTPResponse();
|
||||||
|
Loading…
Reference in New Issue
Block a user