using CI for about three weeks now in development I came accross one small strange behaviour
when using GET params like
www.example.com/mycontroller/myfunc.html?blub=something
you get a 404 while
www.example.com/mycontroller/myfunc.html?blub=something&bla=somethingelse
doesnt get you there
Thats caused by a function within the router class which checks if there is exactly one get param given and which causes the name of this param
to resolve to the controller.
So with above example it tries to call controller ‘blub’ which doesnt exist of course : )
To fix that ... here a patch against the Router.php which fixes this based on the config setting for segmented urls (if we do or dont want to use them)
Maybe one could also better use some other config directive though
--- Router.php.old 2006-12-17 11:36:06.000000000 +0100
+++ Router.php 2006-12-17 13:14:40.000000000 +0100
@@ -293,7 +293,7 @@
// build the URI string from the zero index of the $_GET array.
// This avoids having to deal with $_SERVER variables, which
// can be unreliable in some environments
- if (is_array($_GET) AND count($_GET) == 1)
+ if ($this->config->item('enable_query_strings') === TRUE AND is_array($_GET) AND count($_GET) == 1)
{
// Note: Due to a bug in current() that affects some versions
// of PHP we can not pass function call directly into it
I hope this is going to be found useful and that I am not off the road with this : )
greets Rico
