- 🇨🇦Canada mparker17 UTC-4
I haven't been able to work on this in ~10 years: un-assigning myself so others can pick it up.
I was getting errors like the following:
Illegal offset type in MembershipEntityController->save() (line 111 of sites/all/modules/membership_entity/membership_entity.controller.inc).
... upon further investigation, this was happening because $membership->uid
was an array containing the actual UID in the following code:
// Add or remove old roles depending on membership status.
$roles[$membership->uid] = array(
'rid' => $data['primary_role'],
'op' => ($membership->status == MEMBERSHIP_ENTITY_ACTIVE) ? 'add' : 'remove',
);
... even more investigation showed that a single integer value goes into the form in membership_entity_join_form()
...
$form['#membership_entity'] = membership_entity_create(array(
'uid' => $GLOBALS['user']->uid,
'type' => $bundle,
));
... but, when $form_state
is built in drupal_get_form()
, $form_state['values']['uid']
is an array.
I propose we convert $membership->uid
to an integer as soon as we can, in membership_entity_edit_form_submit()
.
None.
None.
None.
Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I haven't been able to work on this in ~10 years: un-assigning myself so others can pick it up.