diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index c3a609f3d..4346b933d 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -991,14 +991,17 @@ class DB_Model extends CI_Model // Find and replace all the occurrences of the provided encrypted columns // with the postgresql decryption function - $query = preg_replace( - '/\b' . $encryptedColumn . '\b/', - sprintf( - self::CRYPT_WHERE_TEMPLATE, - $encryptedColumn, - $decryptionPassword, - $definition[self::CRYPT_CAST] - ), + $query = preg_replace_callback( + '/(?