Commit f0cb504a authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Prevent undefined array keys in AbstractMenuContentObject

Resolves: #98248
Releases: main, 11.5
Change-Id: I365236b8aa959db5092a7c8ba1731674b12f053c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75811


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent 9a70d5f7
......@@ -1052,10 +1052,10 @@ abstract class AbstractMenuContentObject
}
}
if ($this->conf['special.']['items.']['prevnextToSection'] ?? false) {
if (!is_array($recArr['prev']) && is_array($recArr['prevsection_last'])) {
if (!is_array($recArr['prev'] ?? false) && is_array($recArr['prevsection_last'] ?? false)) {
$recArr['prev'] = $recArr['prevsection_last'];
}
if (!is_array($recArr['next']) && is_array($recArr['nextsection'])) {
if (!is_array($recArr['next'] ?? false) && is_array($recArr['nextsection'] ?? false)) {
$recArr['next'] = $recArr['nextsection'];
}
}
......
Supports Markdown
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