summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2018-06-12 15:25:44 +0200
committerAndrey Andreev <narf@devilix.net>2018-06-12 15:35:09 +0200
commit32f8c936898a3619f225f614d03b1cdf7a7e2750 (patch)
tree7d16bf24a9ebc1c77fed00ad83553d1f946fc704 /system/libraries/Form_validation.php
parent6ec8737d96312be99f1e3b6dffaab584cc6204d4 (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.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 6a97ee599..27187df2c 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1234,7 +1234,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);