From 7b0e4e7741b585239ce5a75353911adc299d1910 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 13 May 2022 12:12:44 -0400 Subject: [PATCH] Fixed contacts not importing if location was left blank --- post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post.php b/post.php index ded9baeb..73f88e29 100644 --- a/post.php +++ b/post.php @@ -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?