From c5b88d80486529664c8d100d9f9c05b25ad1b48f Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole Date: Fri, 22 Feb 2019 12:17:02 +0000 Subject: [PATCH] Issue #2917653 by markcarver, bojan_dev, dww, idebr, lauriii: toolbar_preprocess_html() converts attributes from array to Attribute object --- core/modules/toolbar/toolbar.module | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module index 6a900c67c59..a52c85cc09e 100644 --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -295,9 +295,10 @@ function toolbar_preprocess_html(&$variables) { if (!\Drupal::currentUser()->hasPermission('access toolbar')) { return; } - - $variables['attributes'] = new Attribute($variables['attributes']); - $variables['attributes']->addClass(['toolbar-tray-open', 'toolbar-horizontal', 'toolbar-fixed', 'toolbar-loading']); + $variables['attributes']['class'][] = 'toolbar-tray-open'; + $variables['attributes']['class'][] = 'toolbar-horizontal'; + $variables['attributes']['class'][] = 'toolbar-fixed'; + $variables['attributes']['class'][] = 'toolbar-loading'; } /**