From 2265a39e24e715c8b155387df9edcd3031e0aca6 Mon Sep 17 00:00:00 2001 From: Dave Long Date: Thu, 3 Feb 2022 10:49:54 +0000 Subject: [PATCH 1/2] Replace Unicode::strtolower() with mb_strtolower(). --- google_tag.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google_tag.module b/google_tag.module index bec1c24..f5b78dd 100644 --- a/google_tag.module +++ b/google_tag.module @@ -231,7 +231,7 @@ function _google_tag_path_check() { if (!isset($satisfied)) { $config = \Drupal::config('google_tag.settings'); $toggle = $config->get('path_toggle'); - $paths = Unicode::strtolower($config->get('path_list')); + $paths = mb_strtolower($config->get('path_list')); if (empty($paths)) { $satisfied = ($toggle == GOOGLE_TAG_EXCLUDE_LISTED); @@ -244,7 +244,7 @@ function _google_tag_path_check() { // @todo Are not some paths case sensitive??? // Compare the lowercase path alias (if any) and internal path. $path = rtrim($current_path->getPath($request), '/'); - $path_alias = Unicode::strtolower($alias_manager->getAliasByPath($path)); + $path_alias = mb_strtolower($alias_manager->getAliasByPath($path)); $satisfied = $path_matcher->matchPath($path_alias, $paths) || (($path != $path_alias) && $path_matcher->matchPath($path, $paths)); $satisfied = ($toggle == GOOGLE_TAG_EXCLUDE_LISTED) ? !$satisfied : $satisfied; } From 60b3027697972407184e75ac4590b3ab5df1cc71 Mon Sep 17 00:00:00 2001 From: Dave Long Date: Thu, 3 Feb 2022 10:50:14 +0000 Subject: [PATCH 2/2] Replace path.alias_manager with path_alias.manager. --- google_tag.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google_tag.module b/google_tag.module index f5b78dd..24f2448 100644 --- a/google_tag.module +++ b/google_tag.module @@ -239,7 +239,7 @@ function _google_tag_path_check() { else { $request = \Drupal::request(); $current_path = \Drupal::service('path.current'); - $alias_manager = \Drupal::service('path.alias_manager'); + $alias_manager = \Drupal::service('path_alias.manager'); $path_matcher = \Drupal::service('path.matcher'); // @todo Are not some paths case sensitive??? // Compare the lowercase path alias (if any) and internal path.