Fixed contacts not importing if location was left blank

This commit is contained in:
johnnyq
2022-05-13 12:12:44 -04:00
parent 8b5f8547c4
commit 7b0e4e7741

View File

@@ -4458,7 +4458,7 @@ if(isset($_POST["import_client_contacts_csv"])){
$location = trim(strip_tags(mysqli_real_escape_string($mysqli, $column[7])));
$sql_location = mysqli_query($mysqli,"SELECT * FROM locations WHERE location_name = '$location' AND location_client_id = $client_id");
$row = mysqli_fetch_assoc($sql_location);
$location_id = $row['location_id'];
$location_id = intval($row['location_id']);
}
// Potentially import the rest in the future?