Welcome Guest, Not a member yet? Register   Sign In
CI_Router::fetch_method() is blocking necessary 404 errors
#1

[eluser]softark[/eluser]
I think the fetch_method() function of CI_Router needs some revision.
The current source reads ...
Code:
/**
*  Fetch the current method
*
* @access    public
* @return    string
*/
function fetch_method()
{
    if ($this->method == $this->fetch_class())
    {
        return 'index';
    }
    return $this->method;
}

I don't know why it should return 'index' when the method equals class. There may be some reason.
Oh, I've got it. It prevents the calling of the constructor of the controller.

But you will not receive a necessary 404 error page when your requested uri contains "/controller/controller" pattern.

For example, when the controller is "user", /user/user/foo/bar/anything will not result in 404, but will always display /user/index.
And when the "user" controller is the default controller, /user/abc/def/snip/xyz will do the same thing.




Theme © iAndrew 2016 - Forum software by © MyBB