diff options
Diffstat (limited to 'program')
-rw-r--r-- | program/include/rcube_mdb2.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php index a83b463b4..86d798a79 100644 --- a/program/include/rcube_mdb2.php +++ b/program/include/rcube_mdb2.php @@ -330,7 +330,9 @@ class rcube_mdb2 if (!$this->db_handle || $this->db_mode=='r') return FALSE; - return $this->db_handle->lastInsertID($sequence); + $id = $this->db_handle->lastInsertID($sequence); + + return $this->db_handle->isError($id) ? null : $id; } |