Skip to content
Snippets Groups Projects
Commit 304069f7 authored by Ted Bowman's avatar Ted Bowman
Browse files

by tedbow: added check before decrypting

parent e65681d7
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,6 @@ class FieldEncryptDatabaseCache extends DrupalDatabaseCache { ...@@ -25,7 +25,6 @@ class FieldEncryptDatabaseCache extends DrupalDatabaseCache {
*/ */
protected function prepareItem($cache) { protected function prepareItem($cache) {
global $user; global $user;
if (!isset($cache->data)) { if (!isset($cache->data)) {
return FALSE; return FALSE;
} }
......
...@@ -27,7 +27,9 @@ function field_encrypt_do_encrypt($field_info, $phrase) { ...@@ -27,7 +27,9 @@ function field_encrypt_do_encrypt($field_info, $phrase) {
$insert[$field] = $result->$field; $insert[$field] = $result->$field;
unset($result->$field); unset($result->$field);
} }
$insert['value'] = field_encrypt_encrypt(serialize($result), $field_info['settings']['field_encrypt']['phrase']); // encrypt here if (isset($field_info['settings']['field_encrypt'])) {
$insert['value'] = field_encrypt_encrypt(serialize($result), $field_info['settings']['field_encrypt']['phrase']); // encrypt here
}
$inserts[] = $insert; $inserts[] = $insert;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment