summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-11-09 16:27:59 +0100
committerAndrey Andreev <narf@devilix.net>2017-11-09 16:27:59 +0100
commit4541bf930e715917622dc2d225bf5517f99db35a (patch)
treee59bc61d482ff566955ccd0db90b1f6308e17c17 /system/libraries/Email.php
parent44aa1ab0655283b67d6fdcb081803f25453dbc73 (diff)
[ci skip] Fix patch for #5300
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r--system/libraries/Email.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 48726b769..3b1da8de0 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1037,7 +1037,7 @@ class CI_Email {
if (function_exists('idn_to_ascii') && $atpos = strpos($email, '@'))
{
$variant = defined('INTL_IDNA_VARIANT_UTS46') ? INTL_IDNA_VARIANT_UTS46 : INTL_IDNA_VARIANT_2003;
- $email = self::substr($email, 0, ++$atpos).idn_to_ascii(self::substr($email, $atpos), $variant);
+ $email = self::substr($email, 0, ++$atpos).idn_to_ascii(self::substr($email, $atpos), 0, $variant);
}
return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);
@@ -1855,7 +1855,7 @@ class CI_Email {
if (function_exists('idn_to_ascii') && $atpos = strpos($email, '@'))
{
$variant = defined('INTL_IDNA_VARIANT_UTS46') ? INTL_IDNA_VARIANT_UTS46 : INTL_IDNA_VARIANT_2003;
- $email = self::substr($email, 0, ++$atpos).idn_to_ascii(self::substr($email, $atpos), $variant);
+ $email = self::substr($email, 0, ++$atpos).idn_to_ascii(self::substr($email, $atpos), 0, $variant);
}
return (filter_var($email, FILTER_VALIDATE_EMAIL) === $email && preg_match('#\A[a-z0-9._+-]+@[a-z0-9.-]{1,253}\z#i', $email));