Closed (fixed)
Project:
Organic groups defaults
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Oct 2011 at 18:56 UTC
Updated:
7 Dec 2011 at 02:30 UTC
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
Comment #1
kaleworsley commentedFixed.
http://drupal.org/commitlog/commit/13178/8651fa8fabd77040892597fb7a51462...
Cheers,
Kale