summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-08-12 18:05:33 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-08-12 18:05:33 +0000
commitb0ce6fe8d642123f237fb714dc3e4a1d51959e3b (patch)
tree5293fb0120b4c27739e7ae52965c8bd811e9a477
parent0136f416ae2c651cfe4aa22379dc45e6fa871ebc (diff)
Only check for existing contacts if an email address is present
git-svn-id: https://svn.roundcube.net/trunk@5059 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/steps/addressbook/save.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/roundcubemail/program/steps/addressbook/save.inc b/roundcubemail/program/steps/addressbook/save.inc
index 24b1a5da3..c463bf7fe 100644
--- a/roundcubemail/program/steps/addressbook/save.inc
+++ b/roundcubemail/program/steps/addressbook/save.inc
@@ -162,7 +162,7 @@ else {
// show notice if existing contacts with same e-mail are found
$existing = false;
foreach ($CONTACTS->get_col_values('email', $a_record, true) as $email) {
- if (($res = $CONTACTS->search('email', $email, false, false, true)) && $res->count) {
+ if ($email && ($res = $CONTACTS->search('email', $email, false, false, true)) && $res->count) {
$OUTPUT->show_message('contactexists', 'notice', null, false);
break;
}