Commit 8bfa7b9f authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Prevent undefined array key in PageLinkHandler

Resolves: #96479
Releases: main, 11.5
Change-Id: I8f054a9dd38e8b25ac606c002f95cb673e4e280c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72919

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent d673b7f6
......@@ -178,7 +178,7 @@ class PageLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac
foreach ($contentElements as &$contentElement) {
BackendUtility::workspaceOL('tt_content', $contentElement);
$contentElement['url'] = $linkService->asString(['type' => LinkService::TYPE_PAGE, 'pageuid' => $pageId, 'fragment' => $contentElement['uid']]);
$contentElement['isSelected'] = !empty($this->linkParts) && (int)$this->linkParts['url']['fragment'] === (int)$contentElement['uid'];
$contentElement['isSelected'] = (int)($this->linkParts['url']['fragment'] ?? 0) === (int)$contentElement['uid'];
$contentElement['icon'] = $this->iconFactory->getIconForRecord('tt_content', $contentElement, Icon::SIZE_SMALL)->render();
$contentElement['title'] = BackendUtility::getRecordTitle('tt_content', $contentElement, true);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment