Fixed php notice

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.1.0@41550 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-09-10 23:55:38 +00:00 committed by Sam Minnee
parent 6d88f5f77a
commit 18decb4461

View File

@ -386,8 +386,11 @@ class Controller extends ViewableData {
array_unshift(self::$controller_stack, $this);
// Create a new session object
if(!$this->session) {
if(self::$controller_stack[1]) $this->session = self::$controller_stack[1]->getSession();
else $this->session = new Session(null);
if(isset(self::$controller_stack[1])) {
$this->session = self::$controller_stack[1]->getSession();
} else {
$this->session = new Session(null);
}
}
}