Fix validatore

This commit is contained in:
valentina 2024-09-10 09:35:40 +02:00
parent e84fb0d6d9
commit 1e115cd27e
1 changed files with 3 additions and 1 deletions

View File

@ -158,9 +158,10 @@ class Validate
// Indirizzo
$address = $data['result']['company_address'];
$info = explode(PHP_EOL, (string) $address);
$fields['indirizzo'] = $info[0];
$info = explode(' ', $info[1]);
$info = $info[1] ? explode(' ', $info[1]) : $info;
$fields['cap'] = $info[0];
$fields['provincia'] = end($info);
@ -169,6 +170,7 @@ class Validate
$fields['citta'] = implode(' ', $citta);
$result['fields'] = $fields;
}
}