Problem/Motivation
Drupal\Core\Language\LanguageManager->getLanguage()() (Line: 157) is causing deprecations in PHP 8.5.
Steps to reproduce
Run \Drupal\Tests\menu_link_content\Functional\MenuLinkContentTranslationUITest
Proposed resolution
Fix \Drupal\content_translation\Access\ContentTranslationManageAccessCheck::access() to not call \Drupal\Core\Language\LanguageManagerInterface::getLanguage() with a null.
Remaining tasks
User interface changes
None
Introduced terminology
N/a
API changes
None
Data model changes
None
Release notes snippet
N/a
Issue fork drupal-3557522
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3557522-fix-php-8.5
changes, plain diff MR !13815
Comments
Comment #3
alexpottComment #4
smustgrave commentedRan locally with 8.5.0RC3
Actually got failures
Exception: Deprecated function: Using null as an array offset is deprecated, use an empty string instead
Drupal\Core\Language\LanguageManager->getLanguage()() (Line: 157)
With the MR it passes with 0 deprecations
Comment #5
catchNot a huge fan of the if followed directly by the null coalesce, but anything else is probably going to be more verbose.
Committed/pushed to 11.x and cherry-picked to 11.3.x, thanks!