Commit 4b717158 authored by Nikita Hovratov's avatar Nikita Hovratov Committed by Benni Mack
Browse files

[BUGFIX] Fix undefined array key errors for shortcuts without link

Resolves: #95373
Releases: master
Change-Id: I961233104e0f3747aaa67f4e018852824181ee7b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71333

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 898cab02
......@@ -1323,7 +1323,7 @@ abstract class AbstractMenuContentObject
$LD['totalURL'] = $this->parent_cObj->typoLink_URL([
'parameter' => $shortcut['uid'],
'language' => $shortcut['_PAGES_OVERLAY_REQUESTEDLANGUAGE'] ?? 'current',
'additionalParams' => $addParams . $this->I['val']['additionalParams'] . $menuItem['_ADD_GETVARS'],
'additionalParams' => $addParams . $this->I['val']['additionalParams'] . ($menuItem['_ADD_GETVARS'] ?? ''),
'linkAccessRestrictedPages' => !empty($this->mconf['showAccessRestrictedPages']),
]);
}
......
......@@ -531,8 +531,8 @@ class MenuProcessor implements DataProcessorInterface
*/
public function replacePlaceholderInRenderedMenuItem($menuItem, $conf)
{
$link = $this->jsonEncode($menuItem['linkHREF']['HREF']);
$target = $this->jsonEncode($menuItem['linkHREF']['TARGET']);
$link = $this->jsonEncode($menuItem['linkHREF']['HREF'] ?? '');
$target = $this->jsonEncode($menuItem['linkHREF']['TARGET'] ?? '');
$menuItem['parts']['title'] = str_replace(self::LINK_PLACEHOLDER, $link, $menuItem['parts']['title']);
$menuItem['parts']['title'] = str_replace(self::TARGET_PLACEHOLDER, $target, $menuItem['parts']['title']);
......
......@@ -1364,7 +1364,7 @@ class Indexer
'tstamp' => $GLOBALS['EXEC_TIME'],
'crdate' => $GLOBALS['EXEC_TIME'],
'gr_list' => $this->conf['gr_list'],
'externalUrl' => $fileParts['scheme'] ? 1 : 0,
'externalUrl' => ($fileParts['scheme'] ?? false) ? 1 : 0,
'recordUid' => (int)$this->conf['recordUid'],
'freeIndexUid' => (int)$this->conf['freeIndexUid'],
'freeIndexSetId' => (int)$this->conf['freeIndexSetId'],
......
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