From cbf356faabfe7df49a8736c84d8153b4f6f152e0 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 22 Aug 2014 13:00:24 +0000 Subject: [PATCH] Backport commit r48145, committed by Nathan Gray. Make sure the merge doesn't fail if there's no email found --- emailadmin/inc/class.emailadmin_imapbase.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/emailadmin/inc/class.emailadmin_imapbase.inc.php b/emailadmin/inc/class.emailadmin_imapbase.inc.php index f18f88e4a9..728994edfa 100644 --- a/emailadmin/inc/class.emailadmin_imapbase.inc.php +++ b/emailadmin/inc/class.emailadmin_imapbase.inc.php @@ -5925,7 +5925,10 @@ class emailadmin_imapbase //error_log(__METHOD__.' ('.__LINE__.') '.array2string($contact)); $email = ($contact['email'] ? $contact['email'] : $contact['email_home']); $nfn = ($contact['n_fn'] ? $contact['n_fn'] : $contact['n_given'].' '.$contact['n_family']); - $mailObject->AddAddress(self::$idna2->encode($email),$mailObject->EncodeHeader($nfn)); + if($email) + { + $mailObject->AddAddress(self::$idna2->encode($email),$mailObject->EncodeHeader($nfn)); + } } $mailObject->Subject = $bo_merge->merge_string($Subject, $val, $e, 'text/plain', array(), self::$displayCharset); if (!empty($AltBody))