From 89362c403c56cf70b8d56f16e9a849e9beb51d96 Mon Sep 17 00:00:00 2001 From: Caleb Mazalevskis Date: Wed, 15 Feb 2023 23:09:36 +0800 Subject: [PATCH] Refactor str_replace call. --- objects/functions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/objects/functions.php b/objects/functions.php index 979d4f1f1b..c5e1f3f08b 100644 --- a/objects/functions.php +++ b/objects/functions.php @@ -308,8 +308,7 @@ function isAPPInstalled($appName) function getPathToApplication() { - $path = str_replace("install/index.php", "", $_SERVER["SCRIPT_FILENAME"]); - return str_replace("view/configurations.php", "", $path); + return str_replace(['install/index.php', 'view/configurations.php'], '', $_SERVER['SCRIPT_FILENAME']); } function getURLToApplication()