[BUGFIX] Fix collection of allowed pages in suggest receiver 36/57336/2
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 10:14:27 +0000 (12:14 +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/57336
Tested-by: TYPO3com <no-reply@typo3.com>
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 10046c4..e244e53 100644 (file)
@@ -276,11 +276,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;
     }