From 0bfb68cbfe32659c0ebed352570efbe12c58d7a3 Mon Sep 17 00:00:00 2001 From: Oli Mortimer Date: Wed, 20 Sep 2017 19:52:46 +0100 Subject: [PATCH] Address Insert Fix Fixes address not being inserted due to MySQL error: `Incorrect integer value: '' for column 'id'` --- gocart/models/customer_model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gocart/models/customer_model.php b/gocart/models/customer_model.php index 1dbb1d70..bf1cdc6a 100644 --- a/gocart/models/customer_model.php +++ b/gocart/models/customer_model.php @@ -82,6 +82,7 @@ function save_address($data) $this->db->update('customers_address_bank', $data); return $data['id']; } else { + unset($data['id']); $this->db->insert('customers_address_bank', $data); return $this->db->insert_id(); } @@ -376,4 +377,4 @@ function save_group($data) return $this->db->insert_id(); } } -} \ No newline at end of file +}