From a5c8786a34be237a3436b3c96d283462e76a5c3a Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <bruederli@kolabsys.com>
Date: Tue, 06 Nov 2012 15:02:23 -0500
Subject: [PATCH] Merge branch 'release-0.7' of github.com:roundcube/roundcubemail into release-0.7

---
 program/include/rcube_mdb2.php |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php
index 26e5e97..9f56118 100644
--- a/program/include/rcube_mdb2.php
+++ b/program/include/rcube_mdb2.php
@@ -197,7 +197,7 @@
      */
     function is_connected()
     {
-        return PEAR::isError($this->db_handle) ? false : $this->db_connected;
+        return is_a($this->db_handle, 'PEAR_Error') ? false : $this->db_connected;
     }
 
 
@@ -285,7 +285,7 @@
         else {
             $params = (array)$params;
             $q = $this->db_handle->prepare($query, null, $mode=='w' ? MDB2_PREPARE_MANIP : null);
-            if ($this->db_handle->isError($q)) {
+            if (MDB2::isError($q)) {
                 $this->db_error = true;
                 $this->db_error_msg = $q->userinfo;
 
@@ -366,7 +366,7 @@
 
         $id = $this->db_handle->lastInsertID($table);
 
-        return $this->db_handle->isError($id) ? null : $id;
+        return MDB2::isError($id) ? null : $id;
     }
 
 

--
Gitblit v1.9.1