Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
in field_group_remove_empty_display_groups() you reset empty groups by setting them NULL:
// Reset an empty group.
if ($empty_group) {
$element = NULL;
}
This crashes the foreach loop in field_group_field_group_build_pre_render_alter().
One solution could be resetting empty group elements by setting them as empty array:
// Reset an empty group.
if ($empty_group) {
$element = [];
}
Another solution could be adding an if condition around the foreach loop and check if the $element is an array.
Best regards
Michael
Comments
Comment #2
michaelpetri CreditAttribution: michaelpetri commentedDuplicated and already fixed in dev branch. Sorry.