diff options
author | Andrey Andreev <narf@devilix.net> | 2016-10-28 17:34:05 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-10-28 17:34:05 +0200 |
commit | 67b40a561111a5a65faa245cd4c575e8d945cfb8 (patch) | |
tree | 4c9d3c66d666f3a781299e11806a5ff1d11fc3ba /system/libraries/Form_validation.php | |
parent | df34b547c97ba1ce1ddb819495d299cb845a87de (diff) | |
parent | 499c6080cd41927df088206155e4055d4da3e58e (diff) |
Merge branch '3.1-stable' into develop
Resolved conflicts:
system/core/CodeIgniter.php
user_guide_src/source/changelog.rst
user_guide_src/source/conf.py
user_guide_src/source/installation/downloads.rst
user_guide_src/source/installation/upgrading.rst
user_guide_src/source/libraries/form_validation.rst
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r-- | system/libraries/Form_validation.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 4380dd276..384caf000 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1233,9 +1233,9 @@ class CI_Form_validation { */ public function valid_email($str) { - if (function_exists('idn_to_ascii') && $atpos = strpos($str, '@')) + if (function_exists('idn_to_ascii') && sscanf($str, '%[^@]@%s', $name, $domain) === 2) { - $str = substr($str, 0, ++$atpos).idn_to_ascii(substr($str, $atpos)); + $str = $name.'@'.idn_to_ascii($domain); } return (bool) filter_var($str, FILTER_VALIDATE_EMAIL); |