diff --git a/core/includes/theme.inc b/core/includes/theme.inc index e2c06ec..4e30cf8 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1157,13 +1157,13 @@ function theme($hook, $variables = array()) { template_preprocess($default_template_variables, $hook); $variables += $default_template_variables; } - if (isset($variables['attributes']) && $variables['attributes'] && !($variables['attributes'] instanceof Attribute)) { + if (isset($variables['attributes']) && is_array($variables['attributes']) && !($variables['attributes'] instanceof Attribute)) { $variables['attributes'] = new Attribute($variables['attributes']); } - if (isset($variables['title_attributes']) && $variables['title_attributes'] && !($variables['title_attributes'] instanceof Attribute)) { + if (isset($variables['title_attributes']) && is_array($variables['title_attributes']) && !($variables['title_attributes'] instanceof Attribute)) { $variables['title_attributes'] = new Attribute($variables['title_attributes']); } - if (isset($variables['content_attributes']) && $variables['content_attributes'] && !($variables['content_attributes'] instanceof Attribute)) { + if (isset($variables['content_attributes']) && is_array($variables['content_attributes']) && !($variables['content_attributes'] instanceof Attribute)) { $variables['content_attributes'] = new Attribute($variables['content_attributes']); } diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php index 207f20b..f0f873f 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php @@ -159,7 +159,7 @@ protected function renderTests() { $expected = array(); $expected[] = '
'; $expected[] = ''; - $expected[] = '

Powered by Bananas

'; + $expected[] = '

Powered by Bananas

'; $expected[] = ' '; $expected[] = '
'; $expected[] = '
';