Only check for existing contacts if an email address is present

release-0.6
thomascube 13 years ago
parent 57ce504112
commit 615fb1c069

@ -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;
}

Loading…
Cancel
Save