From 304fa0bcea0a3d959ee30f624b9cfc27a46d2cc5 Mon Sep 17 00:00:00 2001 From: Mathieu Lu Date: Mon, 25 Sep 2023 21:09:21 -0400 Subject: [PATCH] dev/core#4623 Standalone: fix currentPath on AngularJS pages (ex: New Mailing) --- CRM/Utils/System/Standalone.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CRM/Utils/System/Standalone.php b/CRM/Utils/System/Standalone.php index bf2a4fa853..6c18d7b4d6 100644 --- a/CRM/Utils/System/Standalone.php +++ b/CRM/Utils/System/Standalone.php @@ -213,9 +213,7 @@ class CRM_Utils_System_Standalone extends CRM_Utils_System_Base { */ public static function currentPath() { $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); - if ($path[0] == '/') { - $path = substr($path, 1); - } + $path = trim($path, '/'); return $path; } -- 2.25.1