summaryrefslogtreecommitdiff
path: root/program/steps/addressbook
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-08-12 18:05:33 +0000
committerthomascube <thomas@roundcube.net>2011-08-12 18:05:33 +0000
commit615fb1c06912bd0e13c49575eeb8440028d26117 (patch)
tree2a0cb2017be1d3b02a96acc37a6a2a80839f1940 /program/steps/addressbook
parent57ce5041123500b3fa65e2ccfb8acf3ae2765c07 (diff)
Only check for existing contacts if an email address is present
Diffstat (limited to 'program/steps/addressbook')
-rw-r--r--program/steps/addressbook/save.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index 24b1a5da3..c463bf7fe 100644
--- a/program/steps/addressbook/save.inc
+++ b/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;
}