mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
6d88f5f77a
commit
18decb4461
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user