Skip to content
Snippets Groups Projects
Commit 90269701 authored by Alberto Siles's avatar Alberto Siles Committed by Alberto Siles
Browse files

Issue #3133113 by hatuhay: validate id for menu block

parent 1bf32b1a
No related branches found
No related tags found
No related merge requests found
......@@ -348,7 +348,7 @@ function bootstrap_barrio_preprocess_region(&$variables) {
* Implements hook_preprocess_HOOK() for block.html.twig.
*/
function bootstrap_barrio_preprocess_block(&$variables) {
if ($variables['base_plugin_id'] == 'system_menu_block') {
if ($variables['base_plugin_id'] == 'system_menu_block' && isset($variables['attributes']['id'])) {
$variables['content']['#attributes']['block'] = $variables['attributes']['id'];
}
// Add a clearfix class to system branding blocks.
......
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