[BUGFIX] Prevent PHP warning when trying to loop over null 61/44061/3
authorXavier Perseguers <xavier@typo3.org>
Wed, 14 Oct 2015 15:08:54 +0000 (17:08 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 19 Oct 2015 21:17:22 +0000 (23:17 +0200)
Change-Id: I4ea525317b838452ff6eb166c751fa3c027cfffb
Resolves: #70705
Releases: master
Reviewed-on: http://review.typo3.org/44061
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/backend/Classes/Form/Element/SelectMultipleSideBySideElement.php

index d2ca9bd..c7b628a 100644 (file)
@@ -63,7 +63,7 @@ class SelectMultipleSideBySideElement extends AbstractFormElement
         // Get "removeItems":
         $removeItems = GeneralUtility::trimExplode(',', $parameterArray['fieldTSConfig']['removeItems'], true);
         // Get the array with selected items:
-        $itemsArray = $parameterArray['itemFormElValue'];
+        $itemsArray = $parameterArray['itemFormElValue'] ?: [];
 
         // Perform modification of the selected items array:
         // @todo: this part should probably be moved to TcaSelectItems provider?!