From bdb16b160ac1799c64b458eb1430aaae7e8ed89c Mon Sep 17 00:00:00 2001
From: Benni Mack <benni@typo3.org>
Date: Sat, 25 Mar 2017 18:07:43 +0100
Subject: [PATCH] [BUGFIX] EXT:form - do not wrap in anonymous function

There are no local variables in ext_tables.php that would
justify having a call_user_func() wrap around the
registration of the Form module.

Resolves: #80441
Releases: master
Change-Id: Idd927141ca10c22fcf43b0c553b82518925995cd
Reviewed-on: https://review.typo3.org/52154
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Patrick Broens <patrick@patrickbroens.nl>
Tested-by: Patrick Broens <patrick@patrickbroens.nl>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 typo3/sysext/form/ext_tables.php | 42 +++++++++++++++-----------------
 1 file changed, 20 insertions(+), 22 deletions(-)

diff --git a/typo3/sysext/form/ext_tables.php b/typo3/sysext/form/ext_tables.php
index aae73d76fe31..65a4f3006bce 100644
--- a/typo3/sysext/form/ext_tables.php
+++ b/typo3/sysext/form/ext_tables.php
@@ -1,25 +1,23 @@
 <?php
 defined('TYPO3_MODE') or die();
 
-call_user_func(function () {
-    if (TYPO3_MODE === 'BE') {
-        // Register the backend module Web->Forms
-        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
-            'TYPO3.CMS.Form',
-            'web',
-            'formbuilder',
-            '',
-            [
-                'FormManager' => 'index, show, create, duplicate, references, delete',
-                'FormEditor' => 'index, saveForm, renderFormPage, renderRenderableOptions',
-            ],
-            [
-                'access' => 'user,group',
-                'icon' => 'EXT:form/Resources/Public/Icons/Extension.png',
-                'labels' => 'LLL:EXT:form/Resources/Private/Language/locallang_module.xlf',
-                'navigationComponentId' => '',
-                'inheritNavigationComponentFromMainModule' => false
-            ]
-        );
-    }
-});
+if (TYPO3_MODE === 'BE') {
+    // Register the backend module Web->Forms
+    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
+        'TYPO3.CMS.Form',
+        'web',
+        'formbuilder',
+        '',
+        [
+            'FormManager' => 'index, show, create, duplicate, references, delete',
+            'FormEditor' => 'index, saveForm, renderFormPage, renderRenderableOptions',
+        ],
+        [
+            'access' => 'user,group',
+            'icon' => 'EXT:form/Resources/Public/Icons/Extension.png',
+            'labels' => 'LLL:EXT:form/Resources/Private/Language/locallang_module.xlf',
+            'navigationComponentId' => '',
+            'inheritNavigationComponentFromMainModule' => false
+        ]
+    );
+}
-- 
GitLab