mirror of
https://github.com/PHPMailer/PHPMailer.git
synced 2024-09-20 01:52:15 +02:00
Don't try to output possibly non-existent elements
This commit is contained in:
parent
ca9f6c2d57
commit
3eb9e8b47a
@ -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 = '';
|
||||
|
Loading…
Reference in New Issue
Block a user