Skip to content
Snippets Groups Projects
Commit c8d2e239 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2079863 by filijonka, mrsinguyen, fabricebernhard, Chernous_dn, YesCT:...

Issue #2079863 by filijonka, mrsinguyen, fabricebernhard, Chernous_dn, YesCT: Remove Unused local variable from /core/lib/Drupal/Component Utility/Crypt.php  Transliteration/PHPTransliteration.php  Utility/UserAgent.php  Gettext/PoHeader.php.
parent f82579cb
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -228,7 +228,6 @@ function parsePluralForms($pluralforms) {
// For data compression we store the last position the array value
// changes and store it as default.
$element_stack = $this->parseArithmetic($plural);
$default = 0;
if ($element_stack !== FALSE) {
for ($i = 0; $i <= 199; $i++) {
$plurals[$i] = $this->evaluatePlural($element_stack, $i);
......
......@@ -84,7 +84,6 @@ public function transliterate($string, $langcode = 'en', $unknown_character = '?
// Split into Unicode characters and transliterate each one.
foreach (preg_split('//u', $string, 0, PREG_SPLIT_NO_EMPTY) as $character) {
$code = self::ordUTF8($character);
$to_add = '';
if ($code == -1) {
$to_add = $unknown_character;
}
......
......@@ -30,7 +30,7 @@ class Crypt {
*/
public static function randomBytes($count) {
// $random_state does not use drupal_static as it stores random bytes.
static $random_state, $bytes, $has_openssl;
static $random_state, $bytes;
$missing_bytes = $count - strlen($bytes);
......
......@@ -91,7 +91,6 @@ public static function getBestMatchingLangcode($http_accept_language, $langcodes
// first occurrence of '-' otherwise we get a non-existing language zh.
// All other languages use a langcode without a '-', so we can safely
// split on the first occurrence of it.
$generic_tag = '';
if (strlen($langcode) > 7 && (substr($langcode, 0, 7) == 'zh-hant' || substr($langcode, 0, 7) == 'zh-hans')) {
$generic_tag = substr($langcode, 0, 7);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment