[BUGFIX] Fix collection of allowed pages in suggest receiver 94/57194/4
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Mon, 11 Jun 2018 20:03:50 +0000 (22:03 +0200)
committerAndreas Wolf <andreas.wolf@typo3.org>
Sat, 23 Jun 2018 09:36:20 +0000 (11:36 +0200)
When using the pidList and pidDepth TSconfig settings of the
suggest wizard the recursive collection of the allowed
pages does not abort too early any more due to an invalid condition.

Resolves: #85229
Relates: #77049
Releases: master, 8.7
Change-Id: I2c94f5cc64f57be1319f9e76ed05310fbea0db16
Reviewed-on: https://review.typo3.org/57194
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
typo3/sysext/backend/Classes/Form/Wizard/SuggestWizardDefaultReceiver.php

index b42c080..a165522 100644 (file)
@@ -317,11 +317,11 @@ class SuggestWizardDefaultReceiver
 
             $rows = array_column(($rows ?: []), 'uid', 'uid');
             if (!count($rows)) {
-                $pageIds = array_keys($rows);
-                $pages = array_merge($pages, $pageIds);
-            } else {
                 break;
             }
+
+            $pageIds = array_keys($rows);
+            $pages = array_merge($pages, $pageIds);
         }
         return $pages;
     }