From e876067719f7fcdb5a1d454adb750e534f28439c Mon Sep 17 00:00:00 2001 From: Claus Due Date: Mon, 11 Nov 2024 13:46:15 +0100 Subject: [PATCH] [BUGFIX] Skip invalid pages when building menus --- Classes/ViewHelpers/Menu/AbstractMenuViewHelper.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/ViewHelpers/Menu/AbstractMenuViewHelper.php b/Classes/ViewHelpers/Menu/AbstractMenuViewHelper.php index bc9fdb272..745dd3e6b 100644 --- a/Classes/ViewHelpers/Menu/AbstractMenuViewHelper.php +++ b/Classes/ViewHelpers/Menu/AbstractMenuViewHelper.php @@ -413,6 +413,9 @@ public function parseMenu(array $pages): array $total = count($pages); $processedPages = []; foreach ($pages as $index => $page) { + if (!is_array($page) || !isset($page['uid'])) { + continue; + } $count++; $class = []; $originalPageUid = $page['uid'];