Project

General

Profile

Actions

Bug #99213

closed

FrontendConfigurationManager - Undefined array key "recursive"

Added by Moritz Noll over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Start date:
2022-11-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I get the following error.
Undefined array key "recursive" in /var/www/typo3_src-11.5.19/typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php line 129

Maybe this is the solution.
Original code: https://github.com/TYPO3/typo3/blob/v11.5.19/typo3/sysext/extbase/Classes/Configuration/FrontendConfigurationManager.php#L124
Bring the line $this->contentObject->data['recursive'] to the top under $pages und return a default value if not exists.

protected function overrideStoragePidIfStartingPointIsSet(array $frameworkConfiguration): array
{
    $pages = $this->contentObject->data['pages'] ?? '';
    $recursive = $this->contentObject->data['recursive'] ?? '';
    if (is_string($pages) && $pages !== '') {
        $list = [];
        if ($recursive > 0) {
            $explodedPages = GeneralUtility::trimExplode(',', $pages);
            foreach ($explodedPages as $pid) {
                $pids = $this->contentObject->getTreeList($pid, $this->contentObject->data['recursive']);
                if ($pids !== '') {
                    $list[] = $pids;
                }
            }
        }
        if (!empty($list)) {
            $pages = $pages . ',' . implode(',', $list);
        }
        ArrayUtility::mergeRecursiveWithOverrule($frameworkConfiguration, [
            'persistence' => [
                'storagePid' => $pages,
            ],
        ]);
    }
    return $frameworkConfiguration;
}
Actions #1

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77371

Actions #2

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/77371

Actions #3

Updated by Georg Ringer over 1 year ago

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

Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF