From aa3f45f73b9790eb038e4572a5a0acb8282cc8bd Mon Sep 17 00:00:00 2001 From: Shreesh Arora Date: Fri, 27 Sep 2024 12:50:23 +0530 Subject: [PATCH] Fixed: Error not showing in guest checkout when Invaid email is passed --- controllers/front/AuthController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index 68ccb858d..a6e43a108 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -435,7 +435,9 @@ class AuthControllerCore extends FrontController } if (!Tools::getValue('is_new_customer', 1)) { - if ($idCustomer = Customer::customerExists(Tools::getValue('email'), true, false)) { + if (Validate::isEmail($email = Tools::getValue('email')) + && $idCustomer = Customer::customerExists(Tools::getValue('email'), true, false) + ) { $customer = new Customer($idCustomer); } } @@ -574,7 +576,6 @@ class AuthControllerCore extends FrontController } } } - if (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years')) && !(Tools::getValue('months') == '' && Tools::getValue('days') == '' && Tools::getValue('years') == '')) { $this->errors[] = Tools::displayError('Invalid date of birth'); }