diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-01-30 01:18:05 +0100 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-01-30 01:18:05 +0100 |
commit | 240292e5a7b9ed9ead1b88bc169ad3aeb15900d6 (patch) | |
tree | c359d468c2305f70dfe976f214eee48d84bbbbd3 /system/libraries/URI.php | |
parent | 2712610b7ce4b8beb6984558e4a919c66fb40ca9 (diff) |
fixed bug (#3284) where the $rsegment array would not be set properly if the requested URI contained more segments than the routed URI.
Diffstat (limited to 'system/libraries/URI.php')
-rw-r--r-- | system/libraries/URI.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/system/libraries/URI.php b/system/libraries/URI.php index 6c8eb2e23..8de26f933 100644 --- a/system/libraries/URI.php +++ b/system/libraries/URI.php @@ -246,8 +246,9 @@ class CI_URI { 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)
{
|