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

This commit is contained in:
Klaus Leithoff 2013-01-17 10:22:36 +00:00
parent 616813ae14
commit eb29921b3f

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