diff --git a/public/index.php b/public/index.php index d49672c6d1e7..a6d943a9d861 100644 --- a/public/index.php +++ b/public/index.php @@ -16,7 +16,9 @@ define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR); // Ensure the current directory is pointing to the front controller's directory -chdir(FCPATH); +if (getcwd() . DIRECTORY_SEPARATOR !== FCPATH) { + chdir(FCPATH); +} /* *---------------------------------------------------------------