From 899e5944740f5583f2796138f8181a5f6500fee6 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 14 Oct 2013 09:09:01 +0200 Subject: Key duplicate error on postgres uses SQLSTATE=23505 --- program/lib/Roundcube/rcube_db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'program/lib/Roundcube/rcube_db.php') diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index 08935853a..aaba28172 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -456,7 +456,7 @@ class rcube_db { $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]); -- cgit v1.2.3