From 61ae1509d0cf0e934d6d0885f8b8b13d9c7d2b35 Mon Sep 17 00:00:00 2001 From: ChatGPT Date: Wed, 25 Nov 2026 16:19:39 +0800 Subject: [PATCH] Avoid null array keys on the admin dashboard --- app/view/admin-dashboard.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/view/admin-dashboard.php b/app/view/admin-dashboard.php index 30d7434..5fed558 100644 --- a/app/view/admin-dashboard.php +++ b/app/view/admin-dashboard.php @@ -4,6 +4,7 @@ use App\Content\SystemPage; use App\Content\View; $e = View::escape(...); +$pageTypeLabels = LayoutPage::TYPES + SystemPage::TYPES; $regular = array_filter($pages, static fn (array $page): bool => $page['layout_kind'] === null && $page['page_type'] === 'page'); $live = count(array_filter($regular, static fn (array $page): bool => $page['status'] === 'published')); $defaultSlugs = []; @@ -44,14 +45,14 @@ foreach (['header', 'footer'] as $kind) {
  • - + 站点默认