summaryrefslogtreecommitdiffstats
path: root/lib/db.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-07-01 18:20:27 +0200
committerBart Visscher <bartv@thisnet.nl>2013-07-21 23:17:37 +0200
commit000b5a801f27914d0a906b5f4c6ff58e14e5aebe (patch)
treeae69a305078f66067318ffbc544eb0b774ad6160 /lib/db.php
parentde83bf98c759d8af9483306ddea07006693f74be (diff)
downloadnextcloud-server-000b5a801f27914d0a906b5f4c6ff58e14e5aebe.tar.gz
nextcloud-server-000b5a801f27914d0a906b5f4c6ff58e14e5aebe.zip
Move building error string to connection
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/db.php b/lib/db.php
index 48e1439a336..9270b2a1517 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -433,16 +433,8 @@ class OC_DB {
*/
public static function getErrorMessage($error) {
if (self::$connection) {
- $msg = self::$connection->errorCode() . ': ';
- $errorInfo = self::$connection->errorInfo();
- if (is_array($errorInfo)) {
- $msg .= 'SQLSTATE = '.$errorInfo[0] . ', ';
- $msg .= 'Driver Code = '.$errorInfo[1] . ', ';
- $msg .= 'Driver Message = '.$errorInfo[2];
- }
- return $msg;
+ return self::$connection->getError();
}
-
return '';
}