From a272cc3d2e447506f60c8690813a25c73a13230a Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Sat, 12 Aug 2023 00:48:30 -0600 Subject: [PATCH] Fix crash caused by stale cache --- classes/Router.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/Router.php b/classes/Router.php index 51a5ade..83c9f9a 100644 --- a/classes/Router.php +++ b/classes/Router.php @@ -115,7 +115,8 @@ protected function loadUrlMap() 'titles' => [] ]; foreach ($pages as $page) { - $url = $page->getViewBag()->property('url'); + $viewBag = $page->getViewBag(); + $url = $viewBag ? $viewBag->property('url') : null; if (!$url) { continue; }