Part of the EllisLab Network

Bug Report

Routing “back”

Date: 01/21/2008 Severity: Minor
Status: Resolved Reporter: Seppo
Version: 1.6.0 beta
Keywords: Helpers, Form Helper
Forum Thread: http://codeigniter.com/forums/viewthread/69376/

Description

When the routed uri is contained in the route key, CI does not route “back” to the shorter version

Code Sample

In config/routes.php
$route
['welcome/mymethod'] = "welcome";

In controllers/welcome.php (the default controller)
<?php

class Welcome extends Controller {

    
function Welcome()
    
{
        parent
::Controller();    
    
}
    
    
function index()
    
{
        
echo ($this->uri->rsegment(2));
    
}
}
?>

Expected Result

index

Actual Result

mymethod

Comment on Bug Report

Page 1 of 1 pages
Posted by: Derek Jones on 29 January 2008 7:16pm
Derek Jones's avatar

array_diff(), for the record, is poorly named and documented.  It only returns values from array1 that are not contained in array2-n, so if array2-n also contain all of the values from array1, PHP ignores the rest of the values from the other arrays.

Name:

Email:

Location:

URL:

Remember my personal information

Notify me of follow-up comments?