diff core/modules/system/src/Plugin/Condition/RequestPath.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/core/modules/system/src/Plugin/Condition/RequestPath.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/core/modules/system/src/Plugin/Condition/RequestPath.php	Thu Feb 28 13:21:36 2019 +0000
@@ -2,7 +2,6 @@
 
 namespace Drupal\system\Plugin\Condition;
 
-use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Condition\ConditionPluginBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Path\AliasManagerInterface;
@@ -139,7 +138,7 @@
   public function evaluate() {
     // Convert path to lowercase. This allows comparison of the same path
     // with different case. Ex: /Page, /page, /PAGE.
-    $pages = Unicode::strtolower($this->configuration['pages']);
+    $pages = mb_strtolower($this->configuration['pages']);
     if (!$pages) {
       return TRUE;
     }
@@ -149,7 +148,7 @@
     $path = $this->currentPath->getPath($request);
     // Do not trim a trailing slash if that is the complete path.
     $path = $path === '/' ? $path : rtrim($path, '/');
-    $path_alias = Unicode::strtolower($this->aliasManager->getAliasByPath($path));
+    $path_alias = mb_strtolower($this->aliasManager->getAliasByPath($path));
 
     return $this->pathMatcher->matchPath($path_alias, $pages) || (($path != $path_alias) && $this->pathMatcher->matchPath($path, $pages));
   }