I'm using a number of other OG modules to modify the OG permission structure and hide various elements. One of these hides the $form['og_nodeapi'] fieldset from users. This causes OG Defaults to throw an error:

warning: array_filter() [function.array-filter]: The first argument should be an array in /public_html/sites/all/modules/og_defaults/og_defaults.module on line 501.

Changing lines 500 and 501 to this fixed the problem:

if (in_array($node->type, array_filter(variable_get('og_audience_'. $group->type, array())))
          || (is_array($form['og_nodeapi']['visible']['og_groups']['#default_value']) && count(array_filter($form['og_nodeapi']['visible']['og_groups']['#default_value'])) > 0)) {

It basically just checks to be sure that $form['og_nodeapi']['visible']['og_groups']['#default_value'] actually is an array before trying to determine its size.

Comments

kaleworsley’s picture

Status: Fixed » Closed (fixed)

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