From 3574d3c3b630ec7f8df19a9ea17e06bffc9be022 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 11 Aug 2008 04:48:45 +0000 Subject: [PATCH] Added argument checking to Controller::handleRequest() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60377 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/Controller.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/control/Controller.php b/core/control/Controller.php index b7e068644..64b36681c 100644 --- a/core/control/Controller.php +++ b/core/control/Controller.php @@ -51,7 +51,9 @@ class Controller extends RequestHandlingData { * Handles HTTP requests. * @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->urlParams = $request->allParams(); $this->response = new HTTPResponse();