From c613c6dc432d0d2e83a98d4404e23fa9f5f50bb4 Mon Sep 17 00:00:00 2001 From: Werner Masik Date: Mon, 3 Apr 2023 13:37:12 +0200 Subject: [PATCH] small fix to prevent error when $encryptedColumns is null --- application/core/DB_Model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index 062bc06c2..9b1147f28 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -123,7 +123,7 @@ class DB_Model extends CI_Model if (isError($validate = $this->_prepareUDFsWrite($data, $this->dbTable))) return $validate; // Add the pgp_sym_eccrypt postgresql function to the set clause if needed - $this->_addEncrypt($encryptedColumns, $data); + if (!empty($encryptedColumns)) $this->_addEncrypt($encryptedColumns, $data); // DB-INSERT $insert = $this->db->insert($this->dbTable, $data); @@ -194,7 +194,7 @@ class DB_Model extends CI_Model $this->db->where($tmpId); // Add the pgp_sym_eccrypt postgresql function to the set clause if needed - $this->_addEncrypt($encryptedColumns, $data); + if (!empty($encryptedColumns)) $this->_addEncrypt($encryptedColumns, $data); // DB-UPDATE $update = $this->db->update($this->dbTable, $data);