[BUGFIX] Skip adding child elements if a nested form element is unknown
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Classes / Domain / Factory / ArrayFormFactory.php
index 9baf7f2..bfbbd24 100644 (file)
@@ -112,8 +112,10 @@ class ArrayFormFactory extends AbstractFormFactory
 
         $renderable->setOptions($nestedRenderableConfiguration);
 
-        foreach ($childRenderables as $elementConfiguration) {
-            $this->addNestedRenderable($elementConfiguration, $renderable);
+        if ($renderable instanceof CompositeRenderableInterface) {
+            foreach ($childRenderables as $elementConfiguration) {
+                $this->addNestedRenderable($elementConfiguration, $renderable);
+            }
         }
 
         return $renderable;