summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-07-27 23:07:21 +0200
committerAndrey Andreev <narf@devilix.net>2015-07-27 23:07:21 +0200
commitfddbde69043a1623df8231f96a103af306f5e3db (patch)
treef0b439d5c367ddb25d2f94fec116f6a2b2584e3d /system/core
parentd4a50bd09ee38a25010ac58b17b8db37fc1ec0cb (diff)
Close #4004
Diffstat (limited to 'system/core')
-rw-r--r--system/core/URI.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/core/URI.php b/system/core/URI.php
index 2211e3665..b6eff1f4d 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -201,7 +201,9 @@ class CI_URI {
return '';
}
- $uri = parse_url($_SERVER['REQUEST_URI']);
+ // parse_url() returns false if no host is present, but the path or query string
+ // contains a colon followed by a number
+ $uri = parse_url('dummy'.$_SERVER['REQUEST_URI']);
$query = isset($uri['query']) ? $uri['query'] : '';
$uri = isset($uri['path']) ? $uri['path'] : '';