Skip to content
Snippets Groups Projects
Commit 5dfa2b3d authored by Adil Siddiqui's avatar Adil Siddiqui Committed by Bas Vredeling
Browse files

Issue #3344698 by Adil_Siddiqui, PCate: Warning: foreach() argument must be of...

Issue #3344698 by Adil_Siddiqui, PCate: Warning: foreach() argument must be of type array|object, null given in paragraph_blocks_form_entity_view_display_edit_form_alter
parent 694e3b69
Branches 8.x-1.x
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ function paragraph_blocks_form_entity_view_display_edit_form_alter(&$form, FormS
$view_display = $form_state->getFormObject()->getEntity();
$target_type = $view_display->getTargetEntityTypeId();
$target_bundle = $view_display->getTargetBundle();
foreach ($form['layout']['layout_builder_restrictions']['allowed_blocks']['Paragraphs']['available_blocks'] as $plugin_id => &$element) {
foreach ($form['layout']['layout_builder_restrictions']['allowed_blocks']['Paragraphs']['available_blocks'] ?? [] as $plugin_id => &$element) {
$plugin_parts = explode(':', $plugin_id);
if (count($plugin_parts) < 5) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment