From ca50ee698cdcb3bc836b3697387ac6087ddfad85 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 29 Jul 2019 14:36:00 +0800 Subject: [PATCH] * finish task #6168. --- lib/phpmailer/class.smtp.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/phpmailer/class.smtp.php b/lib/phpmailer/class.smtp.php index 3374104428..ed372e3e2e 100644 --- a/lib/phpmailer/class.smtp.php +++ b/lib/phpmailer/class.smtp.php @@ -235,7 +235,7 @@ class SMTP { if (empty($authtype)) { //If no auth mechanism is specified, attempt to use these, in this order //Try CRAM-MD5 first as it's more secure than the others - foreach (['CRAM-MD5', 'LOGIN', 'PLAIN', 'XOAUTH2', 'NTLM'] as $method) { + foreach (array('CRAM-MD5', 'LOGIN', 'PLAIN', 'XOAUTH2', 'NTLM') as $method) { if (in_array($method, $this->server_caps['AUTH'])) { $authtype = $method; break; @@ -665,7 +665,7 @@ class SMTP { $this->last_reply = $this->get_lines(); // Fetch SMTP code and possible error code explanation - $matches = []; + $matches = array(); if (preg_match('/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]) )?/', $this->last_reply, $matches)) { $code = $matches[1]; $code_ex = (count($matches) > 2 ? $matches[2] : null);