From c7c81e53801a5f3d317f639bf0571dd0ccefc7c8 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Tue, 25 Aug 2015 17:37:16 +0200 Subject: [PATCH] Solve issue in page.active for the homepage. Fixes #279 --- system/src/Grav/Common/Page/Page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index b807fedff..4e88ce5a0 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -1710,7 +1710,7 @@ class Page */ public function active() { - $uri_path = rtrim(self::getGrav()['uri']->path(), '/'); + $uri_path = rtrim(self::getGrav()['uri']->path(), '/') ?: '/'; $routes = self::getGrav()['pages']->routes(); if (isset($routes[$uri_path])) {