Skip to content
Snippets Groups Projects
Commit 1496ad2a authored by David Bätge's avatar David Bätge Committed by Stefan Borchert
Browse files

Issue #3245013 by daveiano, eabquina: Error: Call to a member function bundle() on null

parent 89003dd5
No related branches found
No related tags found
No related merge requests found
......@@ -290,6 +290,9 @@ function paragraphs_sets_field_widget_multivalue_form_alter(array &$elements, Fo
if ($element) {
// Set paragraphs bundle.
$widget_state = ParagraphsSets::getWidgetState($element['#field_parents'], $field_name, $form_state);
if (!is_array($widget_state['paragraphs'])) {
continue;
}
$element['#paragraphs_bundle'] = $widget_state['paragraphs'][$delta]['entity']->bundle();
// Allow modules to alter the field widget form element.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment