From 2859a6659ff53affa326bd55a9a2971a414657b7 Mon Sep 17 00:00:00 2001 From: thomasb Date: Tue, 9 Nov 2010 21:18:53 +0000 Subject: Bugfix: always create a valid result set when reading a single record git-svn-id: https://svn.roundcube.net/trunk@4206 208e9e7b-5314-0410-a742-e7e81cd9613c --- plugins/kolab_addressbook/rcube_kolab_contacts.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/kolab_addressbook/rcube_kolab_contacts.php b/plugins/kolab_addressbook/rcube_kolab_contacts.php index 54effa63c..b76d39aae 100644 --- a/plugins/kolab_addressbook/rcube_kolab_contacts.php +++ b/plugins/kolab_addressbook/rcube_kolab_contacts.php @@ -189,13 +189,10 @@ class rcube_kolab_contacts extends rcube_addressbook public function get_record($id, $assoc=false) { $this->_fetch_data(); - if ($this->contacts[$id] && $assoc) { - return $this->contacts[$id]; - } - else if ($this->contacts[$id]) { + if ($this->contacts[$id]) { $this->result = new rcube_result_set(1); $this->result->add($this->contacts[$id]); - return $this->result; + return $assoc ? $this->contacts[$id] : $this->result; } return false; -- cgit v1.2.3