From 182970eb78ec03de0e215737026176322542f792 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 15 Aug 2019 14:24:40 -0600 Subject: [PATCH] Fix for bad check on $grav_basedir --- system/router.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/system/router.php b/system/router.php index 43571b354..1f16933e2 100644 --- a/system/router.php +++ b/system/router.php @@ -20,9 +20,7 @@ if (is_file($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $_SERVER['SCRIPT_N $grav_index = 'index.php'; /* Check the GRAV_BASEDIR environment variable and use if set */ -$grav_basedir = getenv('GRAV_BASEDIR') ?: ''; - -if (isset($grav_basedir)) { +if ($grav_basedir = getenv('GRAV_BASEDIR') ?: '') { $grav_index = ltrim($grav_basedir, '/') . DIRECTORY_SEPARATOR . $grav_index; $grav_basedir = DIRECTORY_SEPARATOR . trim($grav_basedir, DIRECTORY_SEPARATOR); define('GRAV_ROOT', str_replace(DIRECTORY_SEPARATOR, '/', getcwd()) . $grav_basedir);