diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 7dc62f3..4eacb0b 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2282,7 +2282,7 @@ function template_preprocess_page(&$variables) { } if ($node = \Drupal::request()->attributes->get('node')) { - $variables['node'] = $variables['node']; + $variables['node'] = $node; } // Prepare render array for messages. drupal_get_messages() is called later, diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 24fc6ed..af74f75 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -16,7 +16,6 @@ use Drupal\Core\Database\Query\AlterableInterface; use Drupal\Core\Database\Query\SelectInterface; use Drupal\node\NodeTypeInterface; -use Drupal\node\NodeInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\Display\EntityFormDisplayInterface; @@ -1168,7 +1167,7 @@ function node_block_access($block) { // For blocks with node types associated, if the node type does not match // the settings from this block, deny access to it. $request = \Drupal::request(); - if ($node = \Drupal::request()->attributes->get('node')) { + if ($node = $request->attributes->get('node')) { // Page has node. return in_array($node->bundle(), $allowed_types); }