summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-02-25 19:17:29 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-02-25 19:17:29 +0100
commit7f7b8bc07aedf9da93eecc8163cb9c98a4821eb0 (patch)
tree878073ae65093d7dcb72854e1e96932e7801cde6 /lib/base.php
parentaba60dba287cefdc6fbdcc14437af1d4ab6a12bc (diff)
downloadnextcloud-server-7f7b8bc07aedf9da93eecc8163cb9c98a4821eb0.tar.gz
nextcloud-server-7f7b8bc07aedf9da93eecc8163cb9c98a4821eb0.zip
use error template
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php
index 156edebc136..f9bb1bb11bf 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -324,10 +324,16 @@ class OC {
if (session_start() === false){
OC_Log::write('core', 'Session could not be initialized',
OC_Log::ERROR);
- echo 'Session could not be initialized. Please contact your system';
- echo ' administrator';
+
header('HTTP/1.1 500 Internal Server Error');
- exit(1);
+ $error = 'Session could not be initialized. Please contact your ';
+ $error .= 'system administrator';
+
+ $tmpl = new OC_Template('', 'error', 'guest');
+ $tmpl->assign('errors', array(1 => array('error' => $error)));
+ $tmpl->printPage();
+
+ exit();
}
// regenerate session id periodically to avoid session fixation