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:
Sam Minnee 2008-08-11 04:48:45 +00:00
parent 5988ca478f
commit 3574d3c3b6

View File

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