[FOLLOWUP][BUGFIX] Do not override hidden UC fields in user settings 00/50100/2
authorMarkus Klein <markus.klein@typo3.org>
Fri, 7 Oct 2016 09:56:36 +0000 (11:56 +0200)
committerBenni Mack <benni@typo3.org>
Mon, 10 Oct 2016 19:38:07 +0000 (21:38 +0200)
Check if there is actually a user TSconfig available before using it.

Resolves: #77263
Releases: master, 7.6
Change-Id: Iafc58866325f000077f46f9e77fafb3c80069fe6
Reviewed-on: https://review.typo3.org/50100
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/setup/Classes/Controller/SetupModuleController.php

index cf5ce19..a7b8d1e 100644 (file)
@@ -872,6 +872,9 @@ class SetupModuleController extends AbstractModule
     protected function getFieldsFromShowItem()
     {
         $allowedFields = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_USER_SETTINGS']['showitem'], true);
+        if (!is_array($this->tsFieldConf)) {
+            return $allowedFields;
+        }
         foreach ($this->tsFieldConf as $fieldName => $userTsFieldConfig) {
             if (!empty($userTsFieldConfig['disabled'])) {
                 $fieldName = rtrim($fieldName, '.');