fix: remove g flag for preg_replace

This commit is contained in:
Emmanuel BENOîT 2025-01-05 20:25:25 +01:00
parent b21bf52e4d
commit 08f097cc09
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg

View file

@ -28,7 +28,7 @@ final class URLMapper
public function fromPathInfo( ) public function fromPathInfo( )
{ {
$path = rtrim( preg_replace( '/\/\/+/g', '/', $_SERVER[ 'PATH_INFO' ] ?? '') , '/' ); $path = rtrim( preg_replace( '/\/\/+/', '/', $_SERVER[ 'PATH_INFO' ] ?? '') , '/' );
if ( !$path ) { if ( !$path ) {
$path = '/' . $this->package->config( $this->configBase . '/default' , 'home' ); $path = '/' . $this->package->config( $this->configBase . '/default' , 'home' );
} }