From 899e5944740f5583f2796138f8181a5f6500fee6 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Mon, 14 Oct 2013 03:09:01 -0400 Subject: [PATCH] Key duplicate error on postgres uses SQLSTATE=23505 --- program/lib/Roundcube/rcube_db.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index 0893585..aaba281 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -456,7 +456,7 @@ { $error = $this->dbh->errorInfo(); - if (empty($this->options['ignore_key_errors']) || $error[0] != '23000') { + if (empty($this->options['ignore_key_errors']) || !in_array($error[0], array('23000', '23505'))) { $this->db_error = true; $this->db_error_msg = sprintf('[%s] %s', $error[1], $error[2]); -- Gitblit v1.9.1