Fix wrong variable name
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 555a659..145692e 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1225,9 +1225,9 @@
 	 */
 	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);