From f9201ae527d2c321976658f5c360f7127faa414c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 1 Jun 2014 12:57:30 +0300 Subject: Fix wrong variable name --- system/libraries/Form_validation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/libraries/Form_validation.php') diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 555a65959..145692e89 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1225,9 +1225,9 @@ class CI_Form_validation { */ public function valid_email($str) { - if (function_exists('idn_to_ascii') && $atpos = strpos($email, '@')) + if (function_exists('idn_to_ascii') && $atpos = strpos($str, '@')) { - $email = substr($email, 0, ++$atpos).idn_to_ascii(substr($email, $atpos)); + $str = substr($str, 0, ++$atpos).idn_to_ascii(substr($str, $atpos)); } return (bool) filter_var($str, FILTER_VALIDATE_EMAIL); -- cgit v1.2.3-24-g4f1b