From 1e115cd27e7b715c54f9b2e544194101f48ee96d Mon Sep 17 00:00:00 2001 From: valentina Date: Tue, 10 Sep 2024 09:35:40 +0200 Subject: [PATCH] Fix validatore --- src/Validate.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Validate.php b/src/Validate.php index 068933b50..8d94e1360 100755 --- a/src/Validate.php +++ b/src/Validate.php @@ -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; + } }