0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 10:02:14 +02:00

Don't try to output possibly non-existent elements

This commit is contained in:
Marcus Bointon 2017-07-27 00:00:46 +02:00
parent ca9f6c2d57
commit 3eb9e8b47a
No known key found for this signature in database
GPG Key ID: DE31CD6EB646AA24

View File

@ -1721,7 +1721,7 @@ class PHPMailer
foreach ($hosts as $hostentry) {
$hostinfo = [];
if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/', trim($hostentry), $hostinfo)) {
static::edebug($this->lang('connect_host') . ' ' . $hostinfo[3]);
static::edebug($this->lang('connect_host') . ' ' . $hostentry);
// Not a valid host entry
continue;
}
@ -1733,7 +1733,7 @@ class PHPMailer
//Check the host name is a valid name or IP address before trying to use it
if (!static::isValidHost($hostinfo[3])) {
static::edebug($this->lang('connect_host'). ' ' . $hostinfo[3]);
static::edebug($this->lang('connect_host'). ' ' . $hostentry);
continue;
}
$prefix = '';