A remnant of the d6 form API persists in the following:

		function webform_submission_resend($form, $form_state, $node, $submission) {
...
				$form['emails'][$eid]['email'] = array(
					'#markup' => implode('<br />', $email_addresses),
				);
				if (!$valid_email) {
					$form['emails'][$eid]['email']['#value'] .= ' (' . t('empty') . ')'; // SHOULD BE #markup
				}

This both does not append the desired '(empty)' but throws a PHP notice.

It might be marginally better to do:

				if (!$valid_email) {
					$email_addresses[] = ' (' . t('empty') . ')';
				}
				$form['emails'][$eid]['email'] = array(
					'#markup' => implode('<br />', $email_addresses),
				);

or

				$form['emails'][$eid]['email'] = array(
					'#markup' => implode('<br />', $email_addresses) . ($valid_email ? '' :  ' (' . t('empty') . ')'),
				);

To avoid having to re-index into the $form array.

Comments

DanChadwick’s picture

Version: 7.x-3.19 » 7.x-4.x-dev
Status: Active » Fixed

Fixed (at some point) in 4.x, which currently contains:

    if (!$valid_email) {
      $form['emails'][$eid]['email']['#markup'] .= ' (' . t('empty') . ')';
    }

#value changed to #markup.

Thank you to whoever fixed this.

quicksketch’s picture

quicksketch’s picture

Another apology for taking so long to review, you actually filed, fixed, and even closed the same issue twice. :( Still, I really appreciate the help. So, thanks!

Status: Fixed » Closed (fixed)

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