diff --git a/modules/invite/invite-program.php b/modules/invite/invite-program.php index 677df232..0b7ffacb 100644 --- a/modules/invite/invite-program.php +++ b/modules/invite/invite-program.php @@ -164,15 +164,15 @@ if($canSendInvitations) { $tld = substr($friendEmail, $pointPos + 1); $sld = substr($friendEmail, $atPos + 1, strlen($friendEmail) - ($atPos+1) - (strlen($tld)+1) ); if (empty($tld)) { - $this->errors[] = Tools::displayError('Invalid email'); + $errors[] = Tools::displayError('Invalid email'); $_POST['friendsEmail'] = ''; } - if (empty($this->errors)) { + if (empty($errors)) { // If you have a complete list of TLD, check it ! } // Check SLD - if (empty($this->errors)) { + if (empty($errors)) { // Real use case replacement $friendEmail = strtr($friendEmail, $replaceSLD); // Levenhstein remplacement