Closed (fixed)
Project:
Profile Sync Email
Version:
7.x-1.0
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2011 at 09:19 UTC
Updated:
20 Apr 2012 at 00:51 UTC
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
Comment #1
jyee commentedThanks. I've added an isset() check to eliminate the notice.
Comment #3
hazah commentedIt 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'])) {Comment #4
hazah commentedReopening... See note above. With that small change it will actually be fixed. Thanks!
Comment #5
jyee commented@hazah: thanks for catching that. I've added that to the latest release that should be available soon.