Bug #72414
closedFrontendConfigurationManager::overrideStoragePidIfStartingPointIsSet() ignores empty String response from getTreeList()
100%
Description
getTreeList() normally returns a comma separated List of PIDs, but it may also return an empty String (if no corresponding pages are found). In such a case, FrontendConfigurationManager::overrideStoragePidIfStartingPointIsSet() simply appends that empty string to $list (line 125 in FrontendConfigurationManager.php).
Some lines below, this empty String is imploded and appended to $pages, which in my case creates an array with the content "47,". The comma after 47 is the result of $pages = $pages . ',' . implode(',', $list);
with $list being an empty String
I suggest the following fix:
123 $explodedPages = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $pages); 124 foreach ($explodedPages as $pid) { 125 $pidList = $this->contentObject->getTreeList($pid, $this->contentObject->data['recursive']); 126 if ($pidList) { 127 array_push($list, $pidList); 128 } 129 } 130 } 131 if (!empty($list)) { 132 $pages = $pages . ',' . implode(',', $list); 133 }
Kind regards, Jan
Updated by Gerrit Code Review almost 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45421
Updated by Markus Klein almost 9 years ago
- Category set to Extbase
- Assignee set to Markus Klein
- Target version set to 7.6.3
- Complexity set to no-brainer
Updated by Gerrit Code Review almost 9 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45430
Updated by Markus Klein almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ee9971429a0e303f4b5a607d3233b08b77f515dc.
Updated by Gerrit Code Review almost 9 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45432
Updated by Gerrit Code Review almost 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45432
Updated by Philipp Gampe almost 9 years ago
- Status changed from Under Review to Resolved
Applied in changeset a11e14f9d63effdbfda91d67b5cc544d32c1ee03.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed