summaryrefslogtreecommitdiffstats
path: root/lib/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/db.php b/lib/db.php
index 0b7065eec8b..ede8ba897e9 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -92,8 +92,8 @@ class OC_DB {
if( PEAR::isError( self::$DBConnection )){
echo( '<b>can not connect to database, using '.$CONFIG_DBTYPE.'. ('.self::$DBConnection->getUserInfo().')</center>');
$error = self::$DBConnection->getMessage();
- error_log( $error);
- error_log( self::$DBConnection->getUserInfo());
+ if(defined("DEBUG") && DEBUG) {error_log( $error);}
+ if(defined("DEBUG") && DEBUG) {error_log( self::$DBConnection->getUserInfo());}
die( $error );
}
@@ -129,7 +129,7 @@ class OC_DB {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
$entry .= 'Offending command was: '.$query.'<br />';
- error_log( $entry );
+ if(defined("DEBUG") && DEBUG) {error_log( $entry );}
die( $entry );
}
@@ -155,7 +155,7 @@ class OC_DB {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
$entry .= 'Offending command was: '.$query.'<br />';
- error_log( $entry );
+ if(defined("DEBUG") && DEBUG) {error_log( $entry );}
die( $entry );
}