From 930b051182bd47684e364cf1d4f16a1bcf1ff47e Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 13 Apr 2010 01:30:43 +0000 Subject: [PATCH] BUGFIX Checking that URL controller in HTTPRequest->match() is a subclass of Controller, not RequestHandler (which would include nested controllers like Form or FormField subclasses that shouldn't be accessible on their own toplevel URL namespace) (from r97881) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102547 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/HTTPRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/control/HTTPRequest.php b/core/control/HTTPRequest.php index 18987c0c9..d77e4f362 100755 --- a/core/control/HTTPRequest.php +++ b/core/control/HTTPRequest.php @@ -342,7 +342,7 @@ class SS_HTTPRequest implements ArrayAccess { if($varRequired && !isset($this->dirParts[$i])) return false; $arguments[$varName] = isset($this->dirParts[$i]) ? $this->dirParts[$i] : null; - if($part == '$Controller' && (!ClassInfo::exists($arguments['Controller']) || !ClassInfo::is_subclass_of($arguments['Controller'], 'RequestHandler'))) { + if($part == '$Controller' && (!ClassInfo::exists($arguments['Controller']) || !ClassInfo::is_subclass_of($arguments['Controller'], 'Controller'))) { return false; }