Project

General

Profile

Actions

Bug #72414

closed

FrontendConfigurationManager::overrideStoragePidIfStartingPointIsSet() ignores empty String response from getTreeList()

Added by Jan Starke almost 9 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Extbase
Target version:
Start date:
2015-12-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

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

Actions #1

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

Actions #2

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
Actions #3

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

Actions #4

Updated by Markus Klein almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

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

Actions #6

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

Actions #7

Updated by Philipp Gampe almost 9 years ago

  • Status changed from Under Review to Resolved
Actions #8

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF