From 224278cc4dd0c53f8da4379305b0fe2458633e1b Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 05 Jul 2014 07:42:01 -0400
Subject: [PATCH] Fix bug where contacts with no email address were listed on compose addressbook (#1489970)

---
 program/lib/Roundcube/rcube_contacts.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/program/lib/Roundcube/rcube_contacts.php b/program/lib/Roundcube/rcube_contacts.php
index d215760..5e1a40e 100644
--- a/program/lib/Roundcube/rcube_contacts.php
+++ b/program/lib/Roundcube/rcube_contacts.php
@@ -264,7 +264,7 @@
             if ($read_vcard)
                 $sql_arr = $this->convert_db_data($sql_arr);
             else {
-                $sql_arr['email'] = explode(self::SEPARATOR, $sql_arr['email']);
+                $sql_arr['email'] = $sql_arr['email'] ? explode(self::SEPARATOR, $sql_arr['email']) : array();
                 $sql_arr['email'] = array_map('trim', $sql_arr['email']);
             }
 

--
Gitblit v1.9.1