From a4c47c674df2be3d32dcbb1e924986bc7df600ce Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Mon, 25 Jun 2012 11:55:51 +0200 Subject: [PATCH] write sql errors into the error log for better debugging --- lib/db.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/db.php b/lib/db.php index dc9e3392d0..9e6835adc6 100644 --- a/lib/db.php +++ b/lib/db.php @@ -246,6 +246,7 @@ class OC_DB { $entry = 'DB Error: "'.$result->getMessage().'"
'; $entry .= 'Offending command was: '.$query.'
'; 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().'"
'; $entry .= 'Offending command was: '.$query.'
'; OC_Log::write('core',$entry,OC_Log::FATAL); + error_log('DB error: '.$entry); die( $entry ); } $result=new PDOStatementWrapper($result);