handle php warning, when trying to call AddrAppend with empty object/array

This commit is contained in:
Klaus Leithoff 2013-01-17 10:14:45 +00:00
parent 65ced130f4
commit c8aaaa68cf

View File

@ -176,9 +176,10 @@ class egw_mailer extends PHPMailer
*/
public function AddrAppend($type, $addr)
{
if (is_null($addr)) $addr = array();
foreach($addr as $data)
{
$this->addresses[$type][] = $data[0];
if (!empty($data[0])) $this->addresses[$type][] = $data[0];
}
return parent::AddrAppend($type, $addr);
}