summaryrefslogtreecommitdiffstats
path: root/lib/db.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-06-25 11:55:51 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-06-25 11:55:51 +0200
commita4c47c674df2be3d32dcbb1e924986bc7df600ce (patch)
tree0c241a4235adc230d48c9d445bb5e1657bbeb81c /lib/db.php
parent9ee528bc74a924def23168cd2ef8ccbdcbc649c8 (diff)
downloadnextcloud-server-a4c47c674df2be3d32dcbb1e924986bc7df600ce.tar.gz
nextcloud-server-a4c47c674df2be3d32dcbb1e924986bc7df600ce.zip
write sql errors into the error log for better debugging
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/db.php b/lib/db.php
index dc9e3392d0a..9e6835adc6f 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -246,6 +246,7 @@ class OC_DB {
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
$entry .= 'Offending command was: '.$query.'<br />';
OC_Log::write('core',$entry,OC_Log::FATAL);
+ error_log('DB error: '.$entry);
die( $entry );
}
}else{
@@ -255,6 +256,7 @@ class OC_DB {
$entry = 'DB Error: "'.$e->getMessage().'"<br />';
$entry .= 'Offending command was: '.$query.'<br />';
OC_Log::write('core',$entry,OC_Log::FATAL);
+ error_log('DB error: '.$entry);
die( $entry );
}
$result=new PDOStatementWrapper($result);