Merge pull request #9100 from JaredBoone/bugfix/8387-master

Do not convert email addresses with idn_to_ascii if INTL_IDNA_VARIANT…
This commit is contained in:
blizzz 2018-04-06 10:36:07 +02:00 committed by GitHub
commit 50442b265d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -205,7 +205,7 @@ class Mailer implements IMailer {
* @return string Converted mail address if `idn_to_ascii` exists
*/
protected function convertEmail(string $email): string {
if (!function_exists('idn_to_ascii') || strpos($email, '@') === false) {
if (!function_exists('idn_to_ascii') || !defined('INTL_IDNA_VARIANT_UTS46') || strpos($email, '@') === false) {
return $email;
}

View File

@ -66,7 +66,7 @@ class Message implements IMessage {
* @return array Converted addresses if `idn_to_ascii` exists
*/
protected function convertAddresses(array $addresses): array {
if (!function_exists('idn_to_ascii')) {
if (!function_exists('idn_to_ascii') || !defined('INTL_IDNA_VARIANT_UTS46')) {
return $addresses;
}