Skip to content

Commit

Permalink
Merge pull request #7559 from BennyBPB/4.4
Browse files Browse the repository at this point in the history
perf: Change current directory in public/index.php only if necessary
  • Loading branch information
kenjis authored Jun 27, 2023
2 parents 7d3b36a + cd4fbe1 commit 1be4b4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
*---------------------------------------------------------------
Expand Down

0 comments on commit 1be4b4f

Please sign in to comment.