Error message

You need to log in or create an account to access this page.

Nice module, but got an error:

Notice: Undefined index: mail in profile_sync_email_user() (line 115 of drupal7/sites/all/modules/profile_sync_email/profile_sync_email.module).

I have a multivalue mail field. When I save the Profile, the field gets updated, but I get the error.

Comments

jyee’s picture

Status: Active » Fixed

Thanks. I've added an isset() check to eliminate the notice.

Status: Fixed » Closed (fixed)

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

hazah’s picture

It still happens with the latest stable module. The check is there but it's not the first check in the condition, so it still throws the error. I've changed the order of the checks to get it to go away for good:

line 132 currently is:

if ($email != $edit['mail'] && isset($edit['mail']) && !empty($edit['mail']) && (!isset($_SESSION['profile_sync_email_user']) || !$_SESSION['profile_sync_email_user'])) {

But it should be:

if (isset($edit['mail']) && !empty($edit['mail']) && $email != $edit['mail'] && (!isset($_SESSION['profile_sync_email_user']) || !$_SESSION['profile_sync_email_user'])) {

hazah’s picture

Status: Closed (fixed) » Needs work

Reopening... See note above. With that small change it will actually be fixed. Thanks!

jyee’s picture

Status: Needs work » Fixed

@hazah: thanks for catching that. I've added that to the latest release that should be available soon.

Status: Fixed » Closed (fixed)

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