Skip to content
Snippets Groups Projects
Commit 4c6f1abc authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Christian Kuhn
Browse files

[BUGFIX] Prevent undefined array key in TypolinkSoftReferenceParser

Due to an invalid page link, e.g. "t3://page?type=123",
the "pageuid" key might not be set by PageLinkHandler.

This is now properly handled in the parser.

Resolves: #100510
Releases: main, 11.5
Change-Id: I0bc35cc1e3c0f5128ea52e3645faeaa5c600faaf
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78530


Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent a6a1e8bd
Branches
Tags
No related merge requests found
...@@ -123,7 +123,7 @@ class TypolinkSoftReferenceParser extends AbstractSoftReferenceParser ...@@ -123,7 +123,7 @@ class TypolinkSoftReferenceParser extends AbstractSoftReferenceParser
$finalTagParts['uid'] = $linkData['uid']; $finalTagParts['uid'] = $linkData['uid'];
break; break;
case LinkService::TYPE_PAGE: case LinkService::TYPE_PAGE:
$linkData['pageuid'] = (int)$linkData['pageuid']; $linkData['pageuid'] = (int)($linkData['pageuid'] ?? 0);
if (isset($linkData['pagetype'])) { if (isset($linkData['pagetype'])) {
$linkData['pagetype'] = (int)$linkData['pagetype']; $linkData['pagetype'] = (int)$linkData['pagetype'];
} }
......
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