Commit 48fd54c4 authored by Sebastian Michaelsen's avatar Sebastian Michaelsen Committed by Christian Kuhn
Browse files

[TASK] Don't try to create language switch for non-persisted records

The language switch is never rendered for non-persisted records,
so the method to create it should not be called in this sitation.

Resolves: #92971
Releases: master, 10.4
Change-Id: If6d85a7bbf44a841f08d0331da3e5e0943232953

Tested-by: default avatarTYPO3com <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
parent d82bc6c5
......@@ -1016,11 +1016,15 @@ class EditDocumentController
// Setting up the buttons and markers for doc header
// Create language switch options if the record is already persisted
if ($this->isSavedRecord) {
(string)($this->firstEl['table'] ?? ''),
(int)($this->firstEl['uid'] ?? 0),
isset($this->firstEl['pid']) ? (int)$this->firstEl['pid'] : null
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