Skip to content

Commit

Permalink
Changed from ltrim to str_replace to remove multiple backslashes
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks authored and = committed Oct 31, 2013
1 parent 1e6454a commit 3dec4f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Slim/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3dec4f9

Please sign in to comment.