fix: ignore extraneous slashes in paths
This commit is contained in:
parent
da760ee4a3
commit
5320ba3e11
1 changed files with 2 additions and 3 deletions
|
@ -28,9 +28,8 @@ final class URLMapper
|
||||||
|
|
||||||
public function fromPathInfo( )
|
public function fromPathInfo( )
|
||||||
{
|
{
|
||||||
if ( array_key_exists( 'PATH_INFO' , $_SERVER ) ) {
|
$path = rtrim( preg_replace( '/\/\/+/g', '/', $_SERVER[ 'PATH_INFO' ] ?? '') , '/' );
|
||||||
$path = $_SERVER[ 'PATH_INFO' ];
|
if ( !$path ) {
|
||||||
} else {
|
|
||||||
$path = '/' . $this->package->config( $this->configBase . '/default' , 'home' );
|
$path = '/' . $this->package->config( $this->configBase . '/default' , 'home' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue