summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-01-30 01:18:05 +0100
committerDerek Jones <derek.jones@ellislab.com>2008-01-30 01:18:05 +0100
commit240292e5a7b9ed9ead1b88bc169ad3aeb15900d6 (patch)
treec359d468c2305f70dfe976f214eee48d84bbbbd3
parent2712610b7ce4b8beb6984558e4a919c66fb40ca9 (diff)
fixed bug (#3284) where the $rsegment array would not be set properly if the requested URI contained more segments than the routed URI.
-rw-r--r--system/libraries/URI.php5
-rw-r--r--user_guide/changelog.html3
2 files changed, 5 insertions, 3 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)
{
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index b6125b7e1..dc3ddf34c 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -164,9 +164,10 @@ Change Log
<li>Removed an extraneous call to loading models (#3286).</li>
<li>Removed extraneous load of $CFG in _display_cache() of the Output class (#3285).</li>
<li>Removed an unused parameter from Profiler (#3332).</li>
+ <li>Fixed a bug (#3284) where the rsegment array would not be set properly if the requested URI contained more segments than the routed URI.</li>
<li>Fixed a bug (#3314) which would cause the top level path to be deleted in delete_files() of the File helper.</li>
<li>Fixed a bug (#2858) which referenced a wrong variable in the Image class.</li>
- <li>Fixed a bug (#3024) in which master_dim wasn't gettitng reset by clear() in the Image library.</li>
+ <li>Fixed a bug (#3024) in which master_dim wasn't getting reset by clear() in the Image library.</li>
<li>Fixed a bug (#3330) in the FTP class where a comparison wasn't getting made.</li>
<li>Fixed a bug (#3328) where the smiley helper might return an undefined variable.</li>
<li>Fixed a bug (#3310) with sanitization of globals in the Input class that could unset CI's global variables.</li>