summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-06-17 23:41:07 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-06-17 23:41:07 +0300
commitfbbb6ef8ef67aae3c82109a6c311deb703f218a7 (patch)
tree5b12b2e135d18dea64c8ae915629310f6077f59a /lib/base.php
parent6156d71832ee031d8d1f50d8dbff7d0bcfb45541 (diff)
downloadnextcloud-server-fbbb6ef8ef67aae3c82109a6c311deb703f218a7.tar.gz
nextcloud-server-fbbb6ef8ef67aae3c82109a6c311deb703f218a7.zip
Init dummy session first
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php
index 26e9595e869..fd4870974fe 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -288,14 +288,14 @@ class OC {
$cookie_path = OC::$WEBROOT ?: '/';
ini_set('session.cookie_path', $cookie_path);
+ //set the session object to a dummy session so code relying on the session existing still works
+ self::$session = new \OC\Session\Memory('');
+
try{
// set the session name to the instance id - which is unique
self::$session = new \OC\Session\Internal(OC_Util::getInstanceId());
// if session cant be started break with http 500 error
}catch (Exception $e){
- //set the session object to a dummy session so code relying on the session existing still works
- self::$session = new \OC\Session\Memory('');
-
OC_Log::write('core', 'Session could not be initialized',
OC_Log::ERROR);