Solve issue in page.active for the homepage. Fixes #279

This commit is contained in:
Flavio Copes
2015-08-25 17:37:16 +02:00
parent b3c1584630
commit c7c81e5380

View File

@@ -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])) {