Welcome Guest, Not a member yet? Register   Sign In
problem with enable_query_strings=TRUE and uri_protocol=AUTO
#1

[eluser]Unknown[/eluser]
If I set enable_query_strings=TRUE and uri_protocol=AUTO I have problems with opening the default controller URL with one single parameter. I always get the 404 error.
I looked into the URI class and found that the problem was in the following code in the URI::_fetch_uri_string() function:
Code:
if (is_array($_GET) AND count($_GET) == 1 AND trim(key($_GET), '/') != '')
    {
        $this->uri_string = key($_GET);            
        return;
    }
This code returns only the name of the 1st parameter instead of the entire query string and as a result, the router considers this parameter name as a controller name, wants to load it and fails.
Does anybody know why it works this way? It would be logically if it returned a string key($_GET).'='.current(_$GET)
Of course after having modified the code the problem disappeared.
So, is it a feature which I just do not understand or it's a bug?




Theme © iAndrew 2016 - Forum software by © MyBB