From 615fb1c06912bd0e13c49575eeb8440028d26117 Mon Sep 17 00:00:00 2001 From: thomascube Date: Fri, 12 Aug 2011 18:05:33 +0000 Subject: Only check for existing contacts if an email address is present --- program/steps/addressbook/save.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3