From fd42f1c214cdb07c1ee1fe2bb8406c9df5cc8d5c Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 20 Jul 2023 10:29:19 +0200 Subject: [PATCH] Add rcube_db::error_info() --- program/lib/Roundcube/rcube_db.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index ee063c5c0..7e5d9fc07 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -333,6 +333,16 @@ class rcube_db } } + /** + * 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 *