Skip to content

Commit

Permalink
BUGFIX Checking that URL controller in HTTPRequest->match() is a subc…
Browse files Browse the repository at this point in the history
…lass 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
  • Loading branch information
chillu committed Apr 13, 2010
1 parent d43c990 commit 930b051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/control/HTTPRequest.php
Expand Up @@ -342,7 +342,7 @@ function match($pattern, $shiftOnSuccess = false) {
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;
}

Expand Down

0 comments on commit 930b051

Please sign in to comment.