From 3dec4f9ee2e9c204a9f334afd72abc174c1b792e Mon Sep 17 00:00:00 2001 From: silentworks Date: Thu, 31 Oct 2013 00:34:52 +0000 Subject: [PATCH] Changed from ltrim to str_replace to remove multiple backslashes --- Slim/Environment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Slim/Environment.php b/Slim/Environment.php index f13f0dd96..d0f3f0e00 100644 --- a/Slim/Environment.php +++ b/Slim/Environment.php @@ -135,7 +135,7 @@ private function __construct($settings = null) if (strpos($requestUri, $scriptName) !== false) { $physicalPath = $scriptName; // <-- Without rewriting } else { - $physicalPath = ltrim(dirname($scriptName), '\\'); // <-- With rewriting + $physicalPath = str_replace('\\', '', dirname($scriptName)); // <-- With rewriting } $env['SCRIPT_NAME'] = rtrim($physicalPath, '/'); // <-- Remove trailing slashes