diff --git a/core/lib/Drupal/Component/Utility/Unicode.php b/core/lib/Drupal/Component/Utility/Unicode.php index 94c4bcf5e80f..75ffa1ba4fa8 100644 --- a/core/lib/Drupal/Component/Utility/Unicode.php +++ b/core/lib/Drupal/Component/Utility/Unicode.php @@ -553,8 +553,8 @@ EOD; * Returns < 0 if $str1 is less than $str2; > 0 if $str1 is greater than * $str2, and 0 if they are equal. */ - public static function strCaseCmp($str1 , $str2) { - return strcmp(mb_strtoupper($str1, 'utf-8'), mb_strtoupper($str2, 'utf-8')); + public static function strcasecmp($str1 , $str2) { + return strcmp(static::strtoupper($str1), static::strtoupper($str2)); } /** diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php index 37ad89bb0744..2bea49fd3991 100644 --- a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php @@ -125,7 +125,7 @@ class Connection extends DatabaseConnection { $pdo->sqliteCreateFunction('regexp', array(__CLASS__, 'sqlFunctionRegexp')); // Create a user-space case-insensitive collation with UTF-8 support. - $pdo->sqliteCreateCollation('NOCASE_UTF8', array('Drupal\Component\Utility\Unicode', 'strCaseCmp')); + $pdo->sqliteCreateCollation('NOCASE_UTF8', array('Drupal\Component\Utility\Unicode', 'strcasecmp')); // Execute sqlite init_commands. if (isset($connection_options['init_commands'])) {