From c1d947b6d45f2dfa06d4d979ef7ff61b842a5e5d Mon Sep 17 00:00:00 2001
From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org>
Date: Wed, 19 Oct 2016 14:03:36 +0100
Subject: [PATCH] Issue #2713923 by NickWilde, markdorison: A Few
 attributes/new Attribute() calls use strings instead of array for classes

---
 core/includes/form.inc                        | 2 +-
 core/modules/views/views.theme.inc            | 4 ++--
 core/modules/views_ui/src/ViewPreviewForm.php | 2 +-
 core/themes/seven/seven.theme                 | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/core/includes/form.inc b/core/includes/form.inc
index 7dd168b5705c..b4c6a714805f 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -207,7 +207,7 @@ function template_preprocess_fieldset(&$variables) {
   $variables['legend']['attributes'] = new Attribute();
   // Add 'visually-hidden' class to legend span.
   if ($variables['title_display'] == 'invisible') {
-    $variables['legend_span']['attributes'] = new Attribute(array('class' => 'visually-hidden'));
+    $variables['legend_span']['attributes'] = new Attribute(['class' => ['visually-hidden']]);
   }
   else {
     $variables['legend_span']['attributes'] = new Attribute();
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index 94c519e71d7f..8dcdf672b024 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -618,11 +618,11 @@ function template_preprocess_views_view_table(&$variables) {
   if (empty($variables['rows']) && !empty($options['empty_table'])) {
     $build = $view->display_handler->renderArea('empty');
     $variables['rows'][0]['columns'][0]['content'][0]['field_output'] = $build;
-    $variables['rows'][0]['attributes'] = new Attribute(array('class' => 'odd'));
+    $variables['rows'][0]['attributes'] = new Attribute(['class' => ['odd']]);
     // Calculate the amounts of rows with output.
     $variables['rows'][0]['columns'][0]['attributes'] = new Attribute(array(
       'colspan' => count($variables['header']),
-      'class' => 'views-empty',
+      'class' => ['views-empty'],
     ));
   }
 
diff --git a/core/modules/views_ui/src/ViewPreviewForm.php b/core/modules/views_ui/src/ViewPreviewForm.php
index 48e22c5b9944..7b779297deac 100644
--- a/core/modules/views_ui/src/ViewPreviewForm.php
+++ b/core/modules/views_ui/src/ViewPreviewForm.php
@@ -56,7 +56,7 @@ public function form(array $form, FormStateInterface $form_state) {
       $form['preview'] = array(
         '#weight' => 110,
         '#theme_wrappers' => array('container'),
-        '#attributes' => array('id' => 'views-live-preview', 'class' => 'views-live-preview'),
+        '#attributes' => ['id' => 'views-live-preview', 'class' => ['views-live-preview']],
         'preview' => $view->renderPreview($this->displayID, $args),
       );
     }
diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme
index 5ace6b83c2c5..64ee72440df7 100644
--- a/core/themes/seven/seven.theme
+++ b/core/themes/seven/seven.theme
@@ -169,7 +169,7 @@ function seven_form_node_form_alter(&$form, FormStateInterface $form_state) {
       '#value' => $node->isPublished() ? t('Published') : t('Not published'),
       '#access' => !$node->isNew(),
       '#attributes' => array(
-        'class' => 'entity-meta__title',
+        'class' => ['entity-meta__title'],
       ),
     ),
     'changed' => array(
-- 
GitLab