From 1c0129466a60c3965ea999f5a7161b3f34ad56d3 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 4 May 2023 15:23:51 +0200 Subject: [PATCH 1/2] Bugfix: added a check to DB_Model->_addEncrypt method on the parameter encryptedColumns --- application/core/DB_Model.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index d554d8c5c..d286d1d54 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -906,6 +906,9 @@ class DB_Model extends CI_Model */ private function _addEncrypt($encryptedColumns, &$data) { + // If encryptedColumns is not defined then exit + if (isEmptyArray($encryptedColumns)) return; + $tmpData = array(); // Temporary array used to copy not encrypted columns // For each column that is going to be inserted/updated From defe4e2f936012384b981af1a264ba9a09eb2d5c Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 4 May 2023 15:33:08 +0200 Subject: [PATCH 2/2] Added new interface application/core/IEncryption.php --- application/core/IEncryption.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 application/core/IEncryption.php diff --git a/application/core/IEncryption.php b/application/core/IEncryption.php new file mode 100644 index 000000000..6b9132c23 --- /dev/null +++ b/application/core/IEncryption.php @@ -0,0 +1,24 @@ +. + */ + +interface IEncryption +{ + public function getEncryptedColumns(): array; +} +