Commit e2cc055d authored by crell's avatar crell Committed by Christian Kuhn
Browse files

[BUGFIX] Fix incorrect variable usage in BackendUserLanguageMigration

This was most likely a very old copy-paste error.

Used command:

> ./Build/Scripts/runTests.sh -s phpstanGenerateBaseline

Resolves: #98025
Releases: main, 11.5
Change-Id: Idacf7ca70895a9fd1be9c765e714a68ab6e44032
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75292

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 09d43bb3
......@@ -3790,11 +3790,6 @@ parameters:
count: 1
path: ../../typo3/sysext/install/Classes/SystemEnvironment/ServerResponse/FileDeclaration.php
-
message: "#^Variable \\$user on left side of \\?\\? is never defined\\.$#"
count: 1
path: ../../typo3/sysext/install/Classes/Updates/BackendUserLanguageMigration.php
-
message: "#^Call to an undefined method Psr\\\\Container\\\\ContainerInterface\\:\\:set\\(\\)\\.$#"
count: 1
......
......@@ -61,7 +61,7 @@ class BackendUserLanguageMigration implements UpgradeWizardInterface
foreach ($this->getRecordsToUpdate() as $record) {
$currentDatabaseFieldValue = (string)($record['lang'] ?? '');
$uc = unserialize($user['uc'] ?? '', ['allowed_classes' => false]);
$uc = unserialize($record['uc'] ?? '', ['allowed_classes' => false]);
// Check if the user has a preference set, otherwise use the default from the database field
// however, "default" is now explicitly set.
$selectedLanguage = $uc['lang'] ?? $currentDatabaseFieldValue;
......
Supports Markdown
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