after applying the patch found in http://drupal.org/node/1474984 I am receiving the following error when trying to create encrypted content:

"Warning: Invalid argument supplied for foreach() in _encrypted_text_node_field_encrypt_decrypt() (line 34 of \sites\all\modules\encrypted_text\encrypted_text.module)."

Here is the offending line and the surrounding lines from the encrypted_text.module file

28. // Handle encrypting/decrypting text fields
29. function _encrypted_text_node_field_encrypt_decrypt($op = 'encrypt', $node, &$field_names) {
30.
31. foreach ($field_names as $field_name) {
32. if (user_access('view all')) {
33.
34. foreach($node->{$field_name}[$node->language] as &$item){
35. if (isset($item['value'])){
36. $field_instance = field_info_instance('node', $field_name, $node->type);
37. $field_langcode = field_language('node', $node, $field_name, $node->language);

Comments

NotGoddess’s picture

Works for me, but I see other issues talking about $node->language not being set in some cases.
Try adding this before line 34 to check:
drupal_set_message( isset($node->language) ? $node->language : 'No language set' );

If you see 'No language set' that's the issue. This should be fixed in current versions of Drupal, but a quick (temporary) fix would be to add this before line 34:
$node->language = ( isset($node->language) ? $node->language : LANGUAGE_NONE );