Fix validazione P.IVA

This commit is contained in:
Thomas Zilio 2019-12-03 20:13:29 +01:00
parent 75506424c5
commit 2d11001af8
2 changed files with 4 additions and 2 deletions

View File

@ -66,7 +66,7 @@ switch ($name) {
$errors[] = tr('La partita iva inserita non possiede un formato valido');
}
if (empty($check['valid'])) {
if (isset($check['valid']) && empty($check['valid'])) {
$result = false;
$errors[] = tr("Impossibile verificare l'origine della partita iva");
}

View File

@ -54,8 +54,10 @@ class Validate
*/
public static function isValidVatNumber($vat_number)
{
if (empty($vat_number)) {
$result['valid-format'] = true;
if (empty($vat_number)) {
return $result;
}
// Controllo sulla sintassi