From cb2c9616d7d19aecdad9a64c581068bdc0ac8e2a Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 29 Jan 2021 14:48:20 +0700 Subject: [PATCH] Initialize route and raw_route, fix empty route as values --- system/src/Grav/Common/Page/Page.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 344a7ba60..30b656562 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -271,7 +271,8 @@ class Page implements PageInterface if ($exists) { $aPage = new Page(); $aPage->init(new SplFileInfo($path), $languageExtension); - + $aPage->route($this->route()); + $aPage->rawRoute($this->rawRoute()); $route = $aPage->header()->routes['default'] ?? $aPage->rawRoute(); if (!$route) { $route = $aPage->route();