[BUGFIX] Prevent notice in SelectMultipleSideBySideElement 35/43835/2
authorNicole Cordes <typo3@cordes.co>
Mon, 5 Oct 2015 20:41:24 +0000 (22:41 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 6 Oct 2015 07:01:11 +0000 (09:01 +0200)
This patch initializes a variable globally as an array to prevent a
notice when the script tries to implode the variable.

Resolves: #70420
Releases: master
Change-Id: I0d26a44ce1ff53ef9e0b8ee0086d0a773cec2c5d
Reviewed-on: http://review.typo3.org/43835
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Form/Element/SelectMultipleSideBySideElement.php

index 8651d3e..3c37e57 100644 (file)
@@ -105,7 +105,7 @@ class SelectMultipleSideBySideElement extends AbstractFormElement {
                $size = $config['autoSizeMax'] ? MathUtility::forceIntegerInRange(count($itemsArray) + 1, MathUtility::forceIntegerInRange($size, 1), $config['autoSizeMax']) : $size;
 
                $itemsToSelect = [];
-               $filterTextfield = '';
+               $filterTextfield = [];
                $filterSelectbox = '';
                if (!$disabled) {
                        // Create option tags:
@@ -135,7 +135,6 @@ class SelectMultipleSideBySideElement extends AbstractFormElement {
                        $itemsToSelect[] = '</select>';
 
                        // enable filter functionality via a text field
-                       $filterTextfield = [];
                        if ($config['enableMultiSelectFilterTextfield']) {
                                $filterTextfield[] = '<span class="input-group input-group-sm">';
                                $filterTextfield[] =    '<span class="input-group-addon">';