Skip to content
Snippets Groups Projects

Issue #3351162 fix: Undefined array key when placing blocks in lbb when default language is not english

Closed Issue #3351162 fix: Undefined array key when placing blocks in lbb when default language is not english
1 file
+ 5
2
Compare changes
  • Side-by-side
  • Inline
+ 5
2
@@ -47,9 +47,12 @@ class BlockForm extends EntityForm {
$block_provider_map = [];
foreach ($definitions as $id => $definition) {
$category_id = $category_label = $definition['category'];
if ($definition['category'] instanceof TranslatableMarkup) {
$category_id = $category_label = $definition['category']->render();
$category_id = $definition["category"]->getUntranslatedString();
$category_label = $definition["category"]->render();
}
else {
$category_id = $category_label = $definition['category'];
}
$blocks[$category_id][$id] = $definition['admin_label'];
Loading