Skip to content

Commit

Permalink
[BUGFIX] Edit a translated record without def. language access
Browse files Browse the repository at this point in the history
Editor without access to default language could not edit a translated
content element, because there was an entry in available languages
for index 0 with null

Resolves: #86771
Releases: master
Change-Id: I608791a6df9b26f420fb233d47f38fe7685931c8
Reviewed-on: https://review.typo3.org/58738
Reviewed-by: Felix Althaus <felix.althaus@undkonsorten.com>
Tested-by: Felix Althaus <felix.althaus@undkonsorten.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
  • Loading branch information
ursulaklinger authored and bmack committed Oct 28, 2018
1 parent 244fb73 commit ed0066a
Showing 1 changed file with 9 additions and 3 deletions.
Expand Up @@ -2464,9 +2464,15 @@ protected function getLanguages(int $id, string $table): array
)
)
->execute();
$availableLanguages = [
0 => $allLanguages[0]
];

$availableLanguages = [];

if ($allLanguages[0] ?? false) {
$availableLanguages = [
0 => $allLanguages[0]
];
}

while ($row = $statement->fetch()) {
$languageId = (int)$row[$GLOBALS['TCA']['pages']['ctrl']['languageField']];
if (isset($allLanguages[$languageId])) {
Expand Down

0 comments on commit ed0066a

Please sign in to comment.