diff --git a/core/modules/block/src/Controller/BlockLibraryController.php b/core/modules/block/src/Controller/BlockLibraryController.php index 3737e26657..2e39f20494 100644 --- a/core/modules/block/src/Controller/BlockLibraryController.php +++ b/core/modules/block/src/Controller/BlockLibraryController.php @@ -106,8 +106,7 @@ public function listBlocks(Request $request, $theme) { // Adds to the "Add custom block" action url route parameters, to provide // correct region setting after creation. - $add_action_url = $build['local_actions']['block_content_add_action']['#link'] - ['url'] ?? NULL; + $add_action_url = $build['local_actions']['block_content_add_action']['#link']['url'] ?? NULL; if ($add_action_url instanceof Url) { $add_action_url->setRouteParameter('region', $region); $build['local_actions']['block_content_add_action']['#link']['url'] = $add_action_url; diff --git a/core/modules/block_content/src/BlockContentForm.php b/core/modules/block_content/src/BlockContentForm.php index 397072b7d4..9516f0b89e 100644 --- a/core/modules/block_content/src/BlockContentForm.php +++ b/core/modules/block_content/src/BlockContentForm.php @@ -73,7 +73,7 @@ public function save(array $form, FormStateInterface $form_state) { [ 'plugin_id' => 'block_content:' . $block->uuid(), 'theme' => $theme, - 'region' => $this->getRequest()->query->get('region') + 'region' => $this->getRequest()->query->get('region'), ] ); }