[BUGFIX] Validate column count before using it 80/56680/2
authorGeorg Ringer <georg.ringer@gmail.com>
Mon, 16 Apr 2018 10:40:37 +0000 (12:40 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 25 Apr 2018 07:52:35 +0000 (09:52 +0200)
Fix a regression introduced with #84338 to check the column count
first before using it.

Resolves: #84491
Releases: master
Change-Id: I7dbfc7f59a3e79bc69ddbca946888f86d96f5fed
Reviewed-on: https://review.typo3.org/56680
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Kay Strobach <typo3@kay-strobach.de>
Tested-by: Kay Strobach <typo3@kay-strobach.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Controller/Wizard/TableController.php

index 9bf5a30..b82b99d 100644 (file)
@@ -493,7 +493,8 @@ class TableController extends AbstractWizardController
                     $configuration = $this->configurationStringToArray($configuration, 0);
                 } else {
                     // Regular line based table configuration:
-                    $configuration = $this->configurationStringToArray($row[$this->P['field']], $row[$this->colsFieldName]);
+                    $columns = $row[$this->colsFieldName] ?? 0;
+                    $configuration = $this->configurationStringToArray($row[$this->P['field']], $columns);
                 }
             }
             $configuration = is_array($configuration) ? $configuration : [];