Fix a warning when there are multiple empty addresses.

This commit is contained in:
Ramon Novoa 2017-07-10 12:20:23 +02:00
parent 7002f24586
commit 48d303cf8f
1 changed files with 6 additions and 4 deletions

View File

@ -326,10 +326,12 @@ sub process_xml_data ($$$$$) {
}
# Save the first address as the main address
$address = $address_list[0];
$address =~ s/^\s+|\s+$//g ;
shift (@address_list);
}
if (defined($address_list[0])) {
$address = $address_list[0];
$address =~ s/^\s+|\s+$//g ;
shift (@address_list);
}
}
# A module with No-learn mode (modo = 0) creates its modules on database only when it is created
my $new_agent = 0;