Skip to content

Commit 806dbd9

Browse files
committed
refactor
1 parent 1ab8442 commit 806dbd9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

system/router.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
$grav_index = 'index.php';
2121

2222
/* Check the GRAV_BASEDIR environment variable and use if set */
23-
if ($grav_basedir = getenv('GRAV_BASEDIR') ?: '') {
23+
$grav_basedir = getenv('GRAV_BASEDIR') ?: '';
24+
if ($grav_basedir) {
2425
$grav_index = ltrim($grav_basedir, '/') . DIRECTORY_SEPARATOR . $grav_index;
2526
$grav_basedir = DIRECTORY_SEPARATOR . trim($grav_basedir, DIRECTORY_SEPARATOR);
2627
define('GRAV_ROOT', str_replace(DIRECTORY_SEPARATOR, '/', getcwd()) . $grav_basedir);

0 commit comments

Comments
 (0)