From a3ad29d74eae7aacb1f80e1c1b1ae5aaca5bd204 Mon Sep 17 00:00:00 2001
From: Marc Egger <marc.egger@uzh.ch>
Date: Fri, 9 Oct 2020 18:06:48 +0200
Subject: [PATCH] fix form export exception: if container id does not exist,
 ignore

---
 extension/Classes/Core/Form/FormAsFile.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extension/Classes/Core/Form/FormAsFile.php b/extension/Classes/Core/Form/FormAsFile.php
index a2e334f24..09ae07e3f 100644
--- a/extension/Classes/Core/Form/FormAsFile.php
+++ b/extension/Classes/Core/Form/FormAsFile.php
@@ -684,7 +684,7 @@ class FormAsFile
 
             // Replace container id references with name references
             $containerId = $formElement[FE_ID_CONTAINER];
-            if ($containerId !== 0) {
+            if ($containerId !== 0 && array_key_exists($containerId, $containerNames)) {
                 $formElement[FE_FILE_CONTAINER_NAME] = $containerNames[$containerId];
             }
 
-- 
GitLab