Can replace customer notes with empty notes (#541).

This commit is contained in:
Alex Tselegidis 2020-03-29 19:00:37 +02:00
parent 6707524ed4
commit 7279b1911e

View file

@ -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.');