diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-04-19 20:41:24 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-04-19 20:41:24 +0000 |
| commit | 21b3b8c5dcd085bd1040add692b8fd6b09b33904 (patch) | |
| tree | 592f05cce72f10580c3e69a7a5a0d6fa532ef563 /roundcubemail/program/include | |
| parent | 47dcc5411ec51b6e06fa3ae68e3fd0375b88df08 (diff) | |
Gracefully shrug on database errors
git-svn-id: https://svn.roundcube.net/trunk@4668 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_mdb2.php | 4 | ||||
| -rw-r--r-- | roundcubemail/program/include/rcube_user.php | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_mdb2.php b/roundcubemail/program/include/rcube_mdb2.php index 36a595098..7675e847f 100644 --- a/roundcubemail/program/include/rcube_mdb2.php +++ b/roundcubemail/program/include/rcube_mdb2.php @@ -266,7 +266,9 @@ class rcube_mdb2 raise_error(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__, - 'message' => $this->db_error_msg), true, true); + 'message' => $this->db_error_msg), true, false); + + $result = false; } else { $result = $q->execute($params); diff --git a/roundcubemail/program/include/rcube_user.php b/roundcubemail/program/include/rcube_user.php index 75faf4728..c9936d619 100644 --- a/roundcubemail/program/include/rcube_user.php +++ b/roundcubemail/program/include/rcube_user.php @@ -288,7 +288,7 @@ class rcube_user // we'll not delete last identity if ($sql_arr['ident_count'] <= 1) - return false; + return -1; $this->db->query( "UPDATE ".get_table_name('identities'). |
