diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-21 22:53:32 -0500 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-21 22:53:32 -0500 |
commit | 5136f6d818d1cb567cdedc468657fb0d0ed82f85 (patch) | |
tree | f75adcdd8a8a3f55b21c85536ed562b3dfc07bd3 | |
parent | d58cee2f7651a2a8cc9ef75a28f54883e2e01a67 (diff) | |
download | nextcloud-server-5136f6d818d1cb567cdedc468657fb0d0ed82f85.tar.gz nextcloud-server-5136f6d818d1cb567cdedc468657fb0d0ed82f85.zip |
Make database connection error messages less verbose
-rw-r--r-- | lib/db.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/db.php b/lib/db.php index 756901d8643..a1faa4b7086 100644 --- a/lib/db.php +++ b/lib/db.php @@ -181,12 +181,13 @@ class OC_DB { try{ self::$PDO=new PDO($dsn, $user, $pass, $opts); }catch(PDOException $e) { + OC_Log::write('core', $e->getMessage(), OC_Log::FATAL); OC_User::setUserId(null); // send http status 503 header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); - OC_Template::printErrorPage('Failed to connect to '.$type.' database. ('.$e->getMessage().')' ); + OC_Template::printErrorPage('Failed to connect to database'); die(); } // We always, really always want associative arrays @@ -288,7 +289,7 @@ class OC_DB { // send http status 503 header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); - OC_Template::printErrorPage('Failed to connect to '.$type.' database. ('.self::$MDB2->getUserInfo().')' ); + OC_Template::printErrorPage('Failed to connect to database'); die(); } |