diff --git a/lib/db/adapter.php b/lib/db/adapter.php index 3b95033119..92c24b46ff 100644 --- a/lib/db/adapter.php +++ b/lib/db/adapter.php @@ -43,9 +43,9 @@ class Adapter { } catch(\Doctrine\DBAL\DBALException $e) { $entry = 'DB Error: "'.$e->getMessage() . '"
'; $entry .= 'Offending command was: ' . $query.'
'; - OC_Log::write('core', $entry, OC_Log::FATAL); + \OC_Log::write('core', $entry, \OC_Log::FATAL); error_log('DB error: ' . $entry); - OC_Template::printErrorPage( $entry ); + \OC_Template::printErrorPage( $entry ); } return $result; diff --git a/lib/db/adaptersqlite.php b/lib/db/adaptersqlite.php index 252fd94b0c..61cfaa4424 100644 --- a/lib/db/adaptersqlite.php +++ b/lib/db/adaptersqlite.php @@ -31,9 +31,9 @@ class AdapterSqlite extends Adapter { } catch(\Doctrine\DBAL\DBALException $e) { $entry = 'DB Error: "'.$e->getMessage() . '"
'; $entry .= 'Offending command was: ' . $query . '
'; - OC_Log::write('core', $entry, OC_Log::FATAL); + \OC_Log::write('core', $entry, \OC_Log::FATAL); error_log('DB error: '.$entry); - OC_Template::printErrorPage( $entry ); + \OC_Template::printErrorPage( $entry ); } if ($stmt->fetchColumn() === 0) { @@ -50,9 +50,9 @@ class AdapterSqlite extends Adapter { } catch(\Doctrine\DBAL\DBALException $e) { $entry = 'DB Error: "'.$e->getMessage() . '"
'; $entry .= 'Offending command was: ' . $query.'
'; - OC_Log::write('core', $entry, OC_Log::FATAL); + \OC_Log::write('core', $entry, \OC_Log::FATAL); error_log('DB error: ' . $entry); - OC_Template::printErrorPage( $entry ); + \OC_Template::printErrorPage( $entry ); } return $result;