Closed (fixed)
Project:
Organic Groups Subscriptions
Version:
5.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2008 at 22:33 UTC
Updated:
7 Apr 2008 at 21:52 UTC
warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/html/test5.2/sites/all/modules/subscriptions_og/subscriptions_og.module on line 902.
subscriptions_og_page_group_type() calls drupal_get_form() with 4 parameters, but drupal_get_form() only accepts 1. As a result subscriptions_og_group_type_form($group_types, $account, $form) does not receive the extra parameters. This causes the above error since $account is not passed along. Please note that there are other non-exposed errors too as the logic will be flawed due to omitted parameter values.
Comments
Comment #1
jgraham commentedInvalid, sorry I misread the documentation.
I think there is an error lurking still, but this is not the cause. I'll open a new ticket if the cause is determined.
Comment #2
jgraham commentedI found the cause of the above error.
When at admin/settings/subscriptions/userdefaults/group
I receive;
subscriptions_og_page_group_type() calls subscriptions_og_group_type_form($group_types, $account, $form) but $account, or the other parameters are not populated with any data.
Comment #3
develcuy commentedThank you @Jgraham, this error happening because I've added handling of groups a user is member.
For userdefaults, $account is NULL because must be handled as anonymous, so now I fixed code to populate $account->uid = 0 but right after validation of $uid which is used to load correct data for subscriptions controls.
Please confirm this error is fixed in CVS.
Blessings!
Comment #4
jgraham commentedConfirmed fixed in CVS.
Defaults are also properly inherited on new user accounts. Great job develCuy! :-D
Setting to fixed.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.