From 4c6f1abcc5d03547923ddf33c620399e02372b72 Mon Sep 17 00:00:00 2001 From: Oliver Bartsch <bo@cedev.de> Date: Thu, 6 Apr 2023 12:48:46 +0200 Subject: [PATCH] [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: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../DataHandling/SoftReference/TypolinkSoftReferenceParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/core/Classes/DataHandling/SoftReference/TypolinkSoftReferenceParser.php b/typo3/sysext/core/Classes/DataHandling/SoftReference/TypolinkSoftReferenceParser.php index 5e9b930cfc5f..cc70d0159396 100644 --- a/typo3/sysext/core/Classes/DataHandling/SoftReference/TypolinkSoftReferenceParser.php +++ b/typo3/sysext/core/Classes/DataHandling/SoftReference/TypolinkSoftReferenceParser.php @@ -123,7 +123,7 @@ class TypolinkSoftReferenceParser extends AbstractSoftReferenceParser $finalTagParts['uid'] = $linkData['uid']; break; case LinkService::TYPE_PAGE: - $linkData['pageuid'] = (int)$linkData['pageuid']; + $linkData['pageuid'] = (int)($linkData['pageuid'] ?? 0); if (isset($linkData['pagetype'])) { $linkData['pagetype'] = (int)$linkData['pagetype']; } -- GitLab