From 87a4a1fcce3892bf3a64903f82fe6a0be0440ab1 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Thu, 15 Nov 2007 22:35:02 +0000 Subject: [PATCH] Error check on homepage redirector (merged from branches/2.2.0, r44869) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44905 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/ContentController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/control/ContentController.php b/core/control/ContentController.php index d11412d90..6013b4700 100644 --- a/core/control/ContentController.php +++ b/core/control/ContentController.php @@ -75,7 +75,7 @@ class ContentController extends Controller { Statistics::collect(); // If we've accessed the homepage as /home/, then we should redirect to /. - if($this->dataRecord && RootURLController::should_be_on_root($this->dataRecord) && !$this->urlParams['Action'] && !$_POST && !$_FILES) { + if($this->dataRecord && $this->dataRecord instanceof SiteTree && RootURLController::should_be_on_root($this->dataRecord) && !$this->urlParams['Action'] && !$_POST && !$_FILES) { $getVars = $_GET; unset($getVars['url']); if($getVars) $url = "?" . http_build_query($getVars);