fixed bug (#3284) where the $rsegment array would not be set properly if the requested URI contained more segments than the routed URI.
diff --git a/system/libraries/URI.php b/system/libraries/URI.php
index 6c8eb2e..8de26f9 100644
--- a/system/libraries/URI.php
+++ b/system/libraries/URI.php
@@ -246,8 +246,9 @@
function _reindex_segments()
{
// Is the routed segment array different then the main segment array?
- $diff = (count(array_diff($this->rsegments, $this->segments)) == 0) ? FALSE : TRUE;
-
+ // have to compute the diff both ways since PHP returns only values in $arr1 that are not in $arr2.
+ $diff = (array_diff($this->rsegments, $this->segments) != array_diff($this->segments, $this->rsegments)) ? TRUE : FALSE;
+
$i = 1;
foreach ($this->segments as $val)
{