[-] BO: Fix fatal error on customer edition when email is not valid

This commit is contained in:
Rémi Gaillard
2013-08-28 17:46:05 +02:00
parent 0a2d8175a7
commit ddc16a2f65
@@ -774,7 +774,8 @@ class AdminCustomersControllerCore extends AdminController
if ($customer_email != $this->object->email)
{
$customer = new Customer();
$customer->getByEmail($customer_email);
if (Validate::isEmail($customer_email))
$customer->getByEmail($customer_email);
if ($customer->id)
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$customer_email;
}