From 7279b1911e911d5d07ed0bbf1a60410b0ad1c16a Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sun, 29 Mar 2020 19:00:37 +0200 Subject: [PATCH] Can replace customer notes with empty notes (#541). --- application/models/Customers_model.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/application/models/Customers_model.php b/application/models/Customers_model.php index eb4ecba2..111aea50 100644 --- a/application/models/Customers_model.php +++ b/application/models/Customers_model.php @@ -129,16 +129,8 @@ class Customers_Model extends CI_Model { */ protected function _update($customer) { - // Do not update empty string values. - foreach ($customer as $key => $value) - { - if ($value === '') - { - unset($customer[$key]); - } - } - $this->db->where('id', $customer['id']); + if ( ! $this->db->update('ea_users', $customer)) { throw new Exception('Could not update customer to the database.');