Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DanielWashbrook’s picture

Version: 7.x-1.x-dev » 7.x-1.0

Found the same problem but on the 1.0 version. Just added an if entry value ! empty based off the aforementioned patch.

Line 71:

function webform_encrypt_webform_submission_render_alter(&$renderable) {
  foreach ($renderable['#submission']->data as $cid => $entry) {
    if (isset($renderable['#node']->webform['components'][$cid]['extra']['encrypt']) &&
        $renderable['#node']->webform['components'][$cid]['extra']['encrypt']) {
      $form_key = $renderable['#node']->webform['components'][$cid]['form_key'];
      // check that the value is set
      if (!empty($entry['value'][0])) {
        if (user_access('view encrypted values')) {
          $renderable[$form_key]['#value'] = decrypt($entry['value'][0], array('base64' => TRUE));
        } else {
          $renderable[$form_key]['#value'] = t('[Value Encrypted]');
        }
      }
    }
  }
}
rossb89’s picture

Patch above was not applying cleanly for me against 1.x-dev, have attached another patch re-rolled against the latest dev.

Manuel Garcia’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Issue tags: +Needs issue summary update

Thanks for the patch!
Could you please expand the description of this issue so it's easier to understand and duplicate the error?

joseph.olstad’s picture

another re-roll for latest 7.x-1.x dev. Seems that part of this was fixed previously.

Manuel Garcia’s picture

Title: [PATCH] Webform Encrypt module breaks mail sending when encrypted field is optional and submitted with empty value » Webform Encrypt module breaks mail sending when encrypted field is optional and submitted with empty value
Status: Needs review » Fixed

Thanks for the reroll @joseph.olstad

I believe this makes sense regardless of the original issue still being valid, so I've gone ahead and committed it.

Please feel free to reopen if the original issue is still happening.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.