summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-12-04 11:18:20 +0100
committerAndrey Andreev <narf@devilix.net>2017-12-04 11:18:20 +0100
commit3ecfcaa94bbae55fec8c2c9bbf8524c49816342f (patch)
tree0f38d6d664c75e8bbea0897b42f67d813c864b50
parent2819340f009e60b79f74ef1c4fc98d469a44d923 (diff)
[ci skip] Fix #5348
-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 6e28989cb..f115d9f40 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1014,7 +1014,7 @@ class CI_Email {
*/
public function valid_email($email)
{
- if (function_exists('idn_to_ascii') && strpos($email, '@'))
+ if (function_exists('idn_to_ascii') && $atpos = strpos($email, '@'))
{
$email = self::substr($email, 0, ++$atpos).idn_to_ascii(self::substr($email, $atpos), 0, INTL_IDNA_VARIANT_UTS46);
}
@@ -1821,7 +1821,7 @@ class CI_Email {
*/
protected function _validate_email_for_shell(&$email)
{
- if (function_exists('idn_to_ascii') && strpos($email, '@'))
+ if (function_exists('idn_to_ascii') && $atpos = strpos($email, '@'))
{
$email = self::substr($email, 0, ++$atpos).idn_to_ascii(self::substr($email, $atpos), 0, INTL_IDNA_VARIANT_UTS46);
}