diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index a0723ed273c..28b5ebb0e56 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -336,6 +336,16 @@ protected function debug($query) } } + /** + * Getter for an information about the last error. + * + * @return ?array [SQLSTATE error code, driver specific error code, driver specific error message] + */ + public function error_info() + { + return $this->dbh ? $this->dbh->errorInfo() : null; + } + /** * Getter for error state *