[BUGFIX] Remove empty values from intExplode in TreeController 35/55335/3
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Thu, 11 Jan 2018 16:30:38 +0000 (17:30 +0100)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 12 Jan 2018 09:14:59 +0000 (10:14 +0100)
intExplode missed an additional parameter which prevents the method
from returning array with empty element.

Now when doktypesToShowInNewPageDragArea is empty,
PageTree API will return empty array.

Resolves: #83542
Releases: master
Change-Id: I0ebfaef8e1ea782580e0feda59958bb39b0ca483
Reviewed-on: https://review.typo3.org/55335
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/backend/Classes/Controller/Page/TreeController.php

index ab8ed52..67fb6e8 100644 (file)
@@ -142,7 +142,7 @@ class TreeController
             }
             $doktypeLabelMap[$doktypeItemConfig[1]] = $doktypeItemConfig[0];
         }
-        $doktypes = GeneralUtility::intExplode(',', $this->getBackendUser()->getTSConfigVal('options.pageTree.doktypesToShowInNewPageDragArea'));
+        $doktypes = GeneralUtility::intExplode(',', $this->getBackendUser()->getTSConfigVal('options.pageTree.doktypesToShowInNewPageDragArea'), true);
         $output = [];
         $allowedDoktypes = GeneralUtility::intExplode(',', $this->getBackendUser()->groupData['pagetypes_select'], true);
         $isAdmin = $this->getBackendUser()->isAdmin();