Use $form_state object for retrieving mail value in _sharedemail_form_submit function.

Problem/Motivation

Now in the _sharedemail_form_submit mail value retrieved from $form['account']['mail']['#value'], need to fix this and use $form_state object, because for some cases it leads to the fatal error exception.

CommentFileSizeAuthor
#6 3194579-6.patch833 bytesandypost
#5 3194579-5.patch987 bytesandypost
#4 3194579-4.patch578 bytesnguerrier
#2 3194579-2.patch1007 bytesdench0

Comments

dench0 created an issue. See original summary.

dench0’s picture

StatusFileSize
new1007 bytes

Here the patch.

baikho’s picture

Status: Active » Needs review

Thanks @dench0, moving to "Needs review" for now.

nguerrier’s picture

StatusFileSize
new578 bytes

Re-rolling patch to include only modified lines (previous one was causing issues to apply to 8.x-2.1 tag).

andypost’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new987 bytes

Here's a fix compatible with 8.x-2.x and 8.x-2.1 - less changes so https://git.drupalcode.org/project/sharedemail/commit/22d6d6c has no effect on patch context

The patch is the same as 4 but with more context

andypost’s picture

StatusFileSize
new833 bytes

Another try with git diff -U2

nguerrier’s picture

That's right, patch #6 still work fine & is better than no context at all :)

  • baikho committed a2e7fe3 on 8.x-2.x authored by andypost
    Issue #3194579 by andypost, dench0, nguerrier: Use $form_state for...
baikho’s picture

Status: Reviewed & tested by the community » Fixed

Thanks all, tagged 8.x-2.2.

Status: Fixed » Closed (fixed)

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