If you are using a custom route that routes to a controller in a subdirectory, then the first parameter after the class/method will not be passed to the method. See this thread: http://codeigniter.com/forums/viewthread/47371/.
in /application/codeigniter/CodeIgniter.php
at line ~217, change:
call_user_func_array(array(&$CI, $method), array_slice($RTR->rsegments, (($RTR->fetch_directory() == '') ? 2 : 3)));
to
if ($RTR->rsegments == $RTR->segments)
{
call_user_func_array(array(&$CI, $method), array_slice($RTR->rsegments, (($RTR->fetch_directory() == '') ? 2 : 3)));
}
else
{
call_user_func_array(array(&$CI, $method), array_slice($RTR->rsegments, 2));
}
Basically the Router class strips any directory from the rsegments array anyway, so the code that moves the offset of array_slice is reduntant and (SHOULD) be safe to remove.
Update: My previous fix broke normal URLs to controllers in sub-dirs. This is a bit of a kludge the alternative meant re-writing portions of the base Router.php class which I didn’t want to do.
