[eluser]drewbee[/eluser]
Lets say we have an example controller foo with a method bar that takes 0 parameters. Function shimmy can take up to two parameters
Code:
controller Foo extends Controller
{
function index()
{
echo 'index page';
}
function bar()
{
echo 'woot';
}
function shimmy($param1 = '', $param2 = '')
{
echo 'Param1: ' . $param1 . ' Param2: ' . $param2;
}
}
Here is what happens when accessing each url (this is expected and works correctly):
[200] /foo > index page
[200] /foo/bar > woot
[404] /foo/asdf
[404] /foo/bar/asdf
However, if a method can take parameters, it allows unlimited entries in the url, even if only the first are actually passed:
[200] /foo/shimmy > Param1 Param2
[200] /foo/shimmy/asdf > Param1 asdf Param2
[200] /foo/shimmy/asdf/jkl > Param1 asdf Param2 jkl
[200] /foo/shimmy/asdf/jkl/a/b/c/d/e/f/g > Param1 asdf Param2 jkl
^ I would expect the last one to throw a 404. Anything over two should throw the 404.
Thoughts, comments? I happened to run across this because I build my bread crumbs dynamically based on the directory path.