From 06b9f30031302bf42052997314fad3e9a3c5bb67 Mon Sep 17 00:00:00 2001
From: webchick <webchick@24967.no-reply.drupal.org>
Date: Wed, 25 Sep 2013 02:17:27 +0200
Subject: [PATCH] Issue #2095971 by ekes: Remove instances of
 menu_get_object()('taxonomy_term()').

---
 core/modules/taxonomy/taxonomy.module | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index 81537b6d9a13..6c996acd66d2 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -458,8 +458,12 @@ function template_preprocess_taxonomy_term(&$variables) {
  *   A taxonomy term entity.
  */
 function taxonomy_term_is_page(Term $term) {
-  $page_term = menu_get_object('taxonomy_term', 2);
-  return (!empty($page_term) ? $page_term->id() == $term->id() : FALSE);
+  $request = \Drupal::request();
+  if ($request->attributes->has('taxonomy_term')) {
+    $page_term = $request->attributes->get('taxonomy_term');
+    return $page_term->id() == $term->id();
+  }
+  return FALSE;
 }
 
 /**
-- 
GitLab