From 08f097cc0946e070ffd6cc51c7d5f50cede5d8a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20BENO=C3=8ET?= Date: Sun, 5 Jan 2025 20:25:25 +0100 Subject: [PATCH] fix: remove `g` flag for `preg_replace` --- includes/core/urls.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/urls.inc.php b/includes/core/urls.inc.php index 1ec0548..a87d7b3 100644 --- a/includes/core/urls.inc.php +++ b/includes/core/urls.inc.php @@ -28,7 +28,7 @@ final class URLMapper public function fromPathInfo( ) { - $path = rtrim( preg_replace( '/\/\/+/g', '/', $_SERVER[ 'PATH_INFO' ] ?? '') , '/' ); + $path = rtrim( preg_replace( '/\/\/+/', '/', $_SERVER[ 'PATH_INFO' ] ?? '') , '/' ); if ( !$path ) { $path = '/' . $this->package->config( $this->configBase . '/default' , 'home' ); }