Fixed bug #3268 where router could leave '/' as the path
diff --git a/system/libraries/URI.php b/system/libraries/URI.php
index 139b52b..5aafbb4 100644
--- a/system/libraries/URI.php
+++ b/system/libraries/URI.php
@@ -78,7 +78,7 @@
 			// Is there a PATH_INFO variable?

 			// Note: some servers seem to have trouble with getenv() so we'll test it two ways		

 			$path = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO');			

-			if ($path != '' AND $path != "/".SELF)

+			if ($path != '' AND $path != '/' AND $path != "/".SELF)

 			{

 				$this->uri_string = $path;

 				return;

@@ -86,7 +86,7 @@
 					

 			// No PATH_INFO?... What about QUERY_STRING?

 			$path =  (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING');	

-			if ($path != '')

+			if ($path != '' AND $path != '/')

 			{

 				$this->uri_string = $path;

 				return;

@@ -94,7 +94,7 @@
 			

 			// No QUERY_STRING?... Maybe the ORIG_PATH_INFO variable exists?

 			$path = (isset($_SERVER['ORIG_PATH_INFO'])) ? $_SERVER['ORIG_PATH_INFO'] : @getenv('ORIG_PATH_INFO');	

-			if ($path != '' AND $path != "/".SELF)

+			if ($path != '' AND $path != '/' AND $path != "/".SELF)

 			{

 				$this->uri_string = $path;

 				return;

@@ -187,14 +187,15 @@
 	 */	

 	function _filter_uri($str)

 	{

-		if ($this->config->item('permitted_uri_chars') != '')

+		if ($str != '' AND $this->config->item('permitted_uri_chars') != '')

 		{

 			if ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))

 			{

 				exit('The URI you submitted has disallowed characters.');

 			}

-		}	

-			return $str;

+		}

+			

+		return $str;

 	}

 

 	// --------------------------------------------------------------------

diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 07a605e..74068ef 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -147,6 +147,7 @@
 <h3>Bug fixes for Version 1.6.0</h3>

 	

 <ul>

+	<li>Fixed a bug (#3268) where the Router could leave '/' as the path.</li>

     <li>Fixed a bug in <kbd>highlight_phrase()</kbd> that caused an error with slashes.</li>

     <li>Fixed a bug: $field_names[] vs $Ffield_names[] in postgre and sqlite drivers.</li>

     <li>Fixed a bug in the <a href="./libraries/file_uploading.html">upload library</a> when allowed_files wasn't defined.</li>