diff --git a/core/lib/Thelia/Model/Customer.php b/core/lib/Thelia/Model/Customer.php index fdd2b7b6c..0f68475a4 100755 --- a/core/lib/Thelia/Model/Customer.php +++ b/core/lib/Thelia/Model/Customer.php @@ -51,13 +51,12 @@ class Customer extends BaseCustomer public function preInsert(\PropelPDO $con = null) { - $customeRef = new CustomRefEvent($this); + $customerRef = new CustomRefEvent($this); if (!is_null($this->dispatcher)) { - $customeRef = new CustomRefEvent($this); - $this->dispatcher->dispatch("customer.creation.customref", $customeRef); + $this->dispatcher->dispatch("customer.creation.customref", $customerRef); } - $this->setRef($customeRef->hasRef()? $customeRef->getRef() : $this->generateRef()); + $this->setRef($customerRef->hasRef()? $customerRef->getRef() : $this->generateRef()); return false; }