diff --git a/field_group.module b/field_group.module index 97e6556..6498b25 100644 --- a/field_group.module +++ b/field_group.module @@ -816,7 +816,7 @@ function field_group_field_group_is_empty($element, $groups) { $empty = field_group_field_group_is_empty($element[$name], $groups); } // Child is a field, the asked element is not empty. - else { + elseif (!empty($element[$name])) { return FALSE; } @@ -1357,7 +1357,7 @@ function field_group_fields_nest(&$element) { // Block denied fields (#access) before they are put in groups. // Fields (not groups) that don't have children (like field_permissions) are removed // in field_group_field_group_build_pre_render_alter. - if ((!isset($element[$child_name]['#access']) || $element[$child_name]['#access'])) { + if (isset($element[$child_name]) && (!isset($element[$child_name]['#access']) || $element[$child_name]['#access'])) { // If this is a group, we have to use a reference to keep the reference // list intact (but if it is a field we don't mind). $group_references[$parent_name][$child_name] = &$element[$child_name];