Skip to content

Commit

Permalink
[ticket/17201] Add comment on need to add dot to script_name
Browse files Browse the repository at this point in the history
PHPBB3-17201
  • Loading branch information
marc1706 committed Oct 29, 2023
1 parent 593c4b8 commit 58fc9e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions phpBB/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1829,6 +1829,7 @@ function phpbb_get_install_redirect(string $phpbb_root_path, string $phpEx): str
$script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
}

// Add trailing dot to prevent dirname() from returning parent directory if $script_name is a directory
$script_name = substr($script_name, -1) === '/' ? $script_name . '.' : $script_name;

// $phpbb_root_path accounts for redirects from e.g. /adm
Expand Down

0 comments on commit 58fc9e0

Please sign in to comment.