diff options
author | Andrey Andreev <narf@devilix.net> | 2018-06-12 15:25:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-12 15:25:44 +0200 |
commit | 9dfb18ce15e50521a1482f6610a2aeaa221b256c (patch) | |
tree | 85e66f27e44a710d9d71130dec15f1b9e310935b /system/libraries/Form_validation.php | |
parent | dc4a791ab07eeadb6f67eb26311c07199855390f (diff) | |
parent | 9bf6753a1bcd54d6ca69fc194efc9f982661aa66 (diff) |
Merge pull request #5510 from johndekroon/develop
Only use the output of idn_to_ascii() if it worked properly
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r-- | system/libraries/Form_validation.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 106907289..bea51648e 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1240,7 +1240,11 @@ class CI_Form_validation { $domain = defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($matches[2], 0, INTL_IDNA_VARIANT_UTS46) : idn_to_ascii($matches[2]); - $str = $matches[1].'@'.$domain; + + if ($domain !== FALSE) + { + $str = $matches[1].'@'.$domain; + } } return (bool) filter_var($str, FILTER_VALIDATE_EMAIL); |