From fde5ee8f31ef55400cf7146ecc8e92d0357c9e29 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 25 Aug 2015 13:00:53 -0700 Subject: [PATCH] A few additional checks added to check_email(). --- class2.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/class2.php b/class2.php index 102b30216..247733123 100644 --- a/class2.php +++ b/class2.php @@ -1363,7 +1363,18 @@ function js_location($qry) } function check_email($email) -{ +{ + + if(empty($email)) + { + return false; + } + + if(is_numeric(substr($email,-1))) // fix for eCaptcha accidently typed on wrong line. + { + return false; + } + if(filter_var($email, FILTER_VALIDATE_EMAIL)) { return $email;