diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 8662aa9..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/core/modules/language/src/Plugin/Block/LanguageBlock.php b/core/modules/language/src/Plugin/Block/LanguageBlock.php index 1e7c26b..bb9455b 100644 --- a/core/modules/language/src/Plugin/Block/LanguageBlock.php +++ b/core/modules/language/src/Plugin/Block/LanguageBlock.php @@ -138,7 +138,7 @@ public function blockForm($form, FormStateInterface $form_state) { $languages = $this->languageManager->getLanguages(); // Warn the user that if only one language is enabled the block won't appear. if (count($languages) == 1) { - drupal_set_message($this->t('Only one language is enabled. Therefore the language switcher block will not be shown. To add a new language on the site, go to @language-link.', array('@language-link' => \Drupal::l(t('Language list'), Url::fromRoute('entity.configurable_language.collection')))), 'warning'); + drupal_set_message($this->t('Only one language is enabled. Therefore the language switcher block will not be shown. To add a new language on the site, go to @language-link.', array('@language-link' => \Drupal::l($this->t('Language list'), Url::fromRoute('entity.configurable_language.collection')))), 'warning'); } // Warn the user that if there are no links to show because language-url // method detection isn't enabled, the block won't appear. diff --git a/core/modules/language/src/Tests/LanguageSwitchingTest.php b/core/modules/language/src/Tests/LanguageSwitchingTest.php index 828e943..828f11a 100644 --- a/core/modules/language/src/Tests/LanguageSwitchingTest.php +++ b/core/modules/language/src/Tests/LanguageSwitchingTest.php @@ -309,7 +309,7 @@ function testLanguageSwitcher() { // TODO: The system can show more than one message, check it in a loop. $warning_messages = $this->xpath('//div[@class="region region-content"]/div[@class="messages messages--status"]/ul/li'); foreach($warning_messages as $warning) { - $warning_bool = ($warning->__toString() == 'The block Language Switcher cannot be added.')? true : false; + $warning_bool = ((string) $warning === 'The block Language Switcher cannot be added.') ? TRUE : FALSE; } $this->assertTrue($warning_bool, 'Message to warning the user the block cannot be added.'); }