Unverified Commit 02234969 authored by alexpott's avatar alexpott
Browse files

Issue #3240911 by andypost: language_test_page_top() causes deprecations on PHP 8.1

parent 8597defb
......@@ -98,7 +98,7 @@ public function getStandardLanguageListWithoutConfigured();
* (optional) The language type; e.g., the interface or the content
* language.
*
* @return string
* @return string|null
* The negotiated language method ID.
*/
public function getNegotiatedLanguageMethod($type = LanguageInterface::TYPE_INTERFACE);
......
......@@ -15,7 +15,7 @@
function language_test_page_top() {
if (\Drupal::moduleHandler()->moduleExists('language')) {
language_test_store_language_negotiation();
\Drupal::messenger()->addStatus(t('Language negotiation method: @name', ['@name' => \Drupal::languageManager()->getNegotiatedLanguageMethod()]));
\Drupal::messenger()->addStatus(t('Language negotiation method: @name', ['@name' => \Drupal::languageManager()->getNegotiatedLanguageMethod() ?? 'Not defined']));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment