diff --git a/core/modules/language/src/ConfigurableLanguageManager.php b/core/modules/language/src/ConfigurableLanguageManager.php index b28e02b8b4fa1e94c5c6ebff07c55209fce1ee80..d849691eadf77db40bfe1026380b54dec9e2462c 100644 --- a/core/modules/language/src/ConfigurableLanguageManager.php +++ b/core/modules/language/src/ConfigurableLanguageManager.php @@ -319,7 +319,7 @@ public function updateLockedLanguageWeights() { // Loop locked languages to maintain the existing order. $locked_languages = $this->getLanguages(Language::STATE_LOCKED); $config_ids = array_map(function($language) { return 'language.entity.' . $language->id; }, $locked_languages); - foreach ($this->configFactory->loadMultiple($config_ids) as $config_id => $config) { + foreach ($this->configFactory->loadMultiple($config_ids) as $config) { // Update system languages weight. $max_weight++; $config->set('weight', $max_weight); diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSelected.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSelected.php index bdbedc526cd6cab5f70cceb75d3a6c560f723e12..4819abfd865016913800528fc3856d6aaac610f2 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSelected.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSelected.php @@ -35,7 +35,6 @@ public function getLangcode(Request $request = NULL) { $langcode = NULL; if ($this->languageManager) { - $languages = $this->languageManager->getLanguages(); $langcode = $this->config->get('language.negotiation')->get('selected_langcode'); } diff --git a/core/modules/language/src/Tests/LanguageConfigurationTest.php b/core/modules/language/src/Tests/LanguageConfigurationTest.php index 6093263d6a8d8d753caae51aab17f43f78ad6a9c..15ccc3d9b155916c80d3c6226b219405f6d587d7 100644 --- a/core/modules/language/src/Tests/LanguageConfigurationTest.php +++ b/core/modules/language/src/Tests/LanguageConfigurationTest.php @@ -34,7 +34,6 @@ public static function getInfo() { * Functional tests for adding, editing and deleting languages. */ function testLanguageConfiguration() { - global $base_url; // User to add and remove language. $admin_user = $this->drupalCreateUser(array('administer languages', 'access administration pages', 'administer site configuration')); diff --git a/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php b/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php index 9554dd809bd36b8c690a9a04646e3968a4323d50..6b4d098033666f7954d967b0575da17919039300 100644 --- a/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php +++ b/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php @@ -34,7 +34,6 @@ public static function getInfo() { * Functional tests for adding, editing and deleting languages. */ public function testLanguageConfiguration() { - global $base_url; // Create user with permissions to add and remove languages. $admin_user = $this->drupalCreateUser(array('administer languages', 'access administration pages')); diff --git a/core/modules/language/src/Tests/LanguageListTest.php b/core/modules/language/src/Tests/LanguageListTest.php index d5abded8ea1d0ec090e7f3f22079cdbf1ef7c99e..9a437a5b7ba08eb4fc12f0f51581e0d61f103d74 100644 --- a/core/modules/language/src/Tests/LanguageListTest.php +++ b/core/modules/language/src/Tests/LanguageListTest.php @@ -34,7 +34,6 @@ public static function getInfo() { * Functional tests for adding, editing and deleting languages. */ function testLanguageList() { - global $base_url; // User to add and remove language. $admin_user = $this->drupalCreateUser(array('administer languages', 'access administration pages', 'administer site configuration')); @@ -118,12 +117,9 @@ function testLanguageList() { $this->assertResponse(404, 'Language no longer found.'); // Make sure the "language_count" state has been updated correctly. $this->container->get('language_manager')->reset(); - $languages = $this->container->get('language_manager')->getLanguages(); // Delete French. $this->drupalPostForm('admin/config/regional/language/delete/fr', array(), t('Delete')); - // Get the count of languages. $this->container->get('language_manager')->reset(); - $languages = $this->container->get('language_manager')->getLanguages(); // We need raw here because %language and %langcode will add HTML. $t_args = array('%language' => 'French', '%langcode' => 'fr'); $this->assertRaw(t('The %language (%langcode) language has been removed.', $t_args), 'The French language has been removed.'); diff --git a/core/modules/language/src/Tests/LanguageSwitchingTest.php b/core/modules/language/src/Tests/LanguageSwitchingTest.php index b4c4616ff79e6749b4af29f074c6e8ec0322e0cd..36607f224074ba6e939c69f2045d04005d3ee2a9 100644 --- a/core/modules/language/src/Tests/LanguageSwitchingTest.php +++ b/core/modules/language/src/Tests/LanguageSwitchingTest.php @@ -240,7 +240,6 @@ protected function doTestLanguageLinkActiveClassAuthenticated() { */ protected function doTestLanguageLinkActiveClassAnonymous() { $function_name = '#type link'; - $path = 'language_test/type-link-active-class'; $this->drupalLogout(); diff --git a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php index 1a2e5d612ea877024b03bd5277c8633f1a0c94af..e828935d8747c23de78fd4b2507973ff2c3e1ca9 100644 --- a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php +++ b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php @@ -90,9 +90,6 @@ function testUILanguageNegotiation() { // For setting browser language preference to some unknown. $http_header_blah = array("Accept-Language: blah;q=1"); - // This domain should switch the UI to Chinese. - $language_domain = 'example.cn'; - // Setup the site languages by installing two languages. // Set the default language in order for the translated string to be registered // into database when seen by t(). Without doing this, our target string diff --git a/core/modules/language/src/Tests/LanguageUrlRewritingTest.php b/core/modules/language/src/Tests/LanguageUrlRewritingTest.php index 39ad3f813834b05871b62d2e48f3b1de12dbef5d..1079031e533a9d44a01a6356479922244711331a 100644 --- a/core/modules/language/src/Tests/LanguageUrlRewritingTest.php +++ b/core/modules/language/src/Tests/LanguageUrlRewritingTest.php @@ -58,7 +58,6 @@ function testUrlRewritingEdgeCases() { $non_existing->id = $this->randomName(); $this->checkUrl($non_existing, 'Path language is ignored if language is not installed.', 'URL language negotiation does not work with non-installed languages'); - $request = $this->prepareRequestForGenerator(); // Check that URL rewriting is not applied to subrequests. $this->drupalGet('language_test/subrequest'); $this->assertText($this->web_user->getUsername(), 'Page correctly retrieved');