diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-06-25 03:34:49 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-06-25 03:34:49 -0700 |
commit | 39cca72964bb4cd7422ccf30c5fc2313570fd818 (patch) | |
tree | 90847ec2a074ac5334bf231ac87b7e603b68bed8 /lib | |
parent | c3b8f2bf64ef7b6cbdabb382b1c0a721bddb4041 (diff) | |
parent | fbbb6ef8ef67aae3c82109a6c311deb703f218a7 (diff) | |
download | nextcloud-server-39cca72964bb4cd7422ccf30c5fc2313570fd818.tar.gz nextcloud-server-39cca72964bb4cd7422ccf30c5fc2313570fd818.zip |
Merge pull request #3750 from owncloud/dummy_session_for_errors
Init dummy session to render error pages
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 6 |
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); |