Skip to content

Commit

Permalink
[-] BO: Fix fatal error on customer edition when email is not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
rGaillard committed Aug 28, 2013
1 parent 0a2d817 commit ddc16a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/admin/AdminCustomersController.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -774,7 +774,8 @@ public function processUpdate()
if ($customer_email != $this->object->email) if ($customer_email != $this->object->email)
{ {
$customer = new Customer(); $customer = new Customer();
$customer->getByEmail($customer_email); if (Validate::isEmail($customer_email))
$customer->getByEmail($customer_email);
if ($customer->id) if ($customer->id)
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$customer_email; $this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$customer_email;
} }
Expand Down

0 comments on commit ddc16a2

Please sign in to comment.