I'm not sure of the expected behaviour of

      if (strcmp('none', $node->email_from_name)) {
        $email_from_name = '';
      }

Don't you just want to check if $node->email_from_name is 'none'?
strcmp returns 0 when the values are the same, as opposed to the expected 1.
This patch corrects that. (+ minor typo in the first comment of the file).

Also, are you sure that having the choice of from = none is a good idea? Not sure that all the email server will accept that (processing, spam).
'Default' should be enough and ensure that these fields are not empty.

CommentFileSizeAuthor
webform.from_none.patch1.17 KBscor

Comments

scor’s picture

Status: Active » Closed (duplicate)