Bug in user-forms.php
-
Hi Ryan
I found a bug in user-forms.php. You only see this bug if you have edited mail lists and they are no longer in canonical index order in the array (one or more has been unset) like i:0;i:0;i:1;i:1;i:2;i:4.The problem is in function gm_user_profile_update(), near the end…
// Loop Through Current Mailing List //foreach ($mailingListSubscriptions as $listId => $list) { foreach ($mailingListSubscriptions as $key => $listId) { if (!in_array($listId, $subscriptions)) { // Key doesnt exist, unsubscribe to this Mailing List gm_unsubscribe_user_list($listId, $userId); } }
You were using the array index as listId not the array value.
What happens next is the gm_unsubscribe_user_list() fails when it calls gm_get_mailing_list($listId) because the listId is bad and it does die() (probably should be using wp_die(), or really not do a die but recover)
Hope this helps.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Bug in user-forms.php’ is closed to new replies.