]> source.dussan.org Git - nextcloud-server.git/commitdiff
Log the session exception when ownCloud is not installed
authorTom Needham <tom@owncloud.com>
Fri, 11 Oct 2013 15:45:58 +0000 (16:45 +0100)
committerTom Needham <tom@owncloud.com>
Fri, 11 Oct 2013 15:45:58 +0000 (16:45 +0100)
lib/base.php

index ff4ca5882131c4cee65613e34414037d05eae533..d4400dcf69c95d1ef6bf9b81924ef5b21d0a3a6e 100644 (file)
@@ -304,9 +304,12 @@ class OC {
                        self::$session = new \OC\Session\Internal(OC_Util::getInstanceId());
                        // if session cant be started break with http 500 error
                } catch (Exception $e) {
-                       OC_Log::write('core', 'Session could not be initialized',
-                               OC_Log::ERROR);
-
+                       if(!OC_Config::getValue('installed')) {
+                               error_log('Session could not be initialized');
+                       } else {
+                               OC_Log::write('core', 'Session could not be initialized',
+                                       OC_Log::ERROR);
+                       }
                        header('HTTP/1.1 500 Internal Server Error');
                        OC_Util::addStyle("styles");
                        $error = 'Session could not be initialized. Please contact your ';