Revert "[TASK] Avoid slow array functions in loops"
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Form / FormDataProvider / TcaTypesShowitem.php
index 0756da2..4ff4294 100644 (file)
@@ -183,7 +183,7 @@ class TcaTypesShowitem implements FormDataProviderInterface
      */
     protected function removeFieldsByBitmaskExcludeBits(array $result, $bitmaskValue, $recordTypeValue)
     {
-        $removeListArray = [[]];
+        $removeListArray = [];
         $bitmaskValue = MathUtility::forceIntegerInRange($bitmaskValue, 0);
         $excludeListBitsArray = $this->processedTca['types'][$recordTypeValue]['bitmask_excludelist_bits'];
         foreach ($excludeListBitsArray as $bitKey => $excludeList) {
@@ -193,10 +193,9 @@ class TcaTypesShowitem implements FormDataProviderInterface
             if (!$isNegative && ($bitmaskValue & pow(2, $bit))
                 || $isNegative && !($bitmaskValue & pow(2, $bit))
             ) {
-                $removeListArray[] = GeneralUtility::trimExplode(',', $excludeList, true);
+                $removeListArray = array_merge($removeListArray, GeneralUtility::trimExplode(',', $excludeList, true));
             }
         }
-        $removeListArray = array_merge(...$removeListArray);
         $result = $this->removeFields($result, $removeListArray, $recordTypeValue);
         return $this->removeFieldsFromPalettes($result, $removeListArray);
     }