From f5d4cdf7c057a93e74b818325890bd2f757fb6a6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 5 Jun 2014 10:33:38 +0000 Subject: [PATCH] fix IDE warnings --- phpgwapi/inc/class.egw_mailer.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.egw_mailer.inc.php b/phpgwapi/inc/class.egw_mailer.inc.php index f1ab06882f..5c046ed039 100644 --- a/phpgwapi/inc/class.egw_mailer.inc.php +++ b/phpgwapi/inc/class.egw_mailer.inc.php @@ -103,7 +103,7 @@ class egw_mailer extends PHPMailer { $port = $this->Port; $hosts = explode(';',$this->Host); - foreach ($hosts as $k => &$host) + foreach ($hosts as &$host) { $host = trim($host); // make sure there is no whitespace leading or trailling the host string if (in_array($port,array(465,587)) && strpos($host,'://')===false) @@ -130,6 +130,7 @@ class egw_mailer extends PHPMailer */ public function SmtpSend($header, $body) { + $matches = null; $mail_id = $GLOBALS['egw']->hooks->process(array( 'location' => 'send_mail', 'subject' => $this->Subject, @@ -138,7 +139,7 @@ class egw_mailer extends PHPMailer 'cc' => $this->addresses['Cc'], 'bcc' => $this->addresses['Bcc'], 'body_sha1' => sha1($body), - 'message_id' => preg_match('/^Message-ID: (.*)$/m', $header,$matches) ? $matches[1] : null, + 'message_id' => preg_match('/^Message-ID: (.*)$/m', $header, $matches) ? $matches[1] : null, ), array(), true); // true = call all apps $this->addresses = array(); // reset addresses for next mail