This commit is contained in:
Michael RICOIS 2018-03-19 12:27:57 +01:00
parent 34e2bdc553
commit 6b863fe940

View File

@ -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