summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeesung Ahn <ahn.heesung@gmail.com>2015-03-30 16:12:01 +0200
committerHeesung Ahn <ahn.heesung@gmail.com>2015-03-30 16:12:01 +0200
commit1dfd2f9eba977870da331d4a0f281c64c4218267 (patch)
treed0ba103b98b6a02167a881f4d744801cb7777b1e
parentaa11370ba3d326eef259fedd5a67481b3aa95df6 (diff)
parent5bd58a94f541e67853e2ee78b39c0cdbc7b7c669 (diff)
Merge origin/develop into UnitTest_Loader
-rw-r--r--system/core/URI.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/system/core/URI.php b/system/core/URI.php
index e96749456..2211e3665 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -205,13 +205,16 @@ class CI_URI {
$query = isset($uri['query']) ? $uri['query'] : '';
$uri = isset($uri['path']) ? $uri['path'] : '';
- if (strpos($uri, $_SERVER['SCRIPT_NAME']) === 0)
+ if (isset($_SERVER['SCRIPT_NAME'][0]))
{
- $uri = (string) substr($uri, strlen($_SERVER['SCRIPT_NAME']));
- }
- elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0)
- {
- $uri = (string) substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME'])));
+ if (strpos($uri, $_SERVER['SCRIPT_NAME']) === 0)
+ {
+ $uri = (string) substr($uri, strlen($_SERVER['SCRIPT_NAME']));
+ }
+ elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0)
+ {
+ $uri = (string) substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME'])));
+ }
}
// This section ensures that even on servers that require the URI to be in the query string (Nginx) a correct