[BUGFIX] Make getCategoryFieldsForTable() compatible with new FormEngine 06/43406/2
authorFrans Saris <franssaris@gmail.com>
Thu, 17 Sep 2015 19:34:38 +0000 (21:34 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 17 Sep 2015 20:05:55 +0000 (22:05 +0200)
Resolves: #69925
Releases: master
Change-Id: Iaa7323c0b685fae4b27d224075905f2e9a68b145
Reviewed-on: http://review.typo3.org/43406
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Category/CategoryRegistry.php

index 67ad67b..c4bd4a0 100644 (file)
@@ -139,10 +139,11 @@ class CategoryRegistry implements SingletonInterface {
         */
        public function getCategoryFieldsForTable(array &$configuration) {
                $table = '';
+               $menuType = isset($configuration['row']['menu_type'][0]) ? $configuration['row']['menu_type'][0] : '';
                // Define the table being looked up from the type of menu
-               if ($configuration['row']['menu_type'] == 'categorized_pages') {
+               if ($menuType === 'categorized_pages') {
                        $table = 'pages';
-               } elseif ($configuration['row']['menu_type'] == 'categorized_content') {
+               } elseif ($menuType === 'categorized_content') {
                        $table = 'tt_content';
                }
                // Return early if no table is defined