Welcome Guest, Not a member yet? Register   Sign In
Incorrect handling of 404?
#7

[eluser]AeroCross[/eluser]
I've been testing that Reactor change, and I've come to realize it's behavior:

When updated to Reactor, if you set "404_override" to a single controller (for example, $route['404_override'] = 'missing'Wink THAT EXISTS it will send you directly to the index method of that controller.

When set to a single controller that DOESN'T EXISTS, it will throw a PHP error.

This is where it gets interesting: If you set a double route (controller/method), it will check if the controller (defined in the routes.php file) exists, THEN OVERRIDE IT and look for the method you defined inside the controller THAT IS BEING SHOWN in the URL. e.g if you have 404_override = 'something/missing' and controller "something" exists, and you call "login/dasassadads", then the "login/missing" method will load instead.

Finally, if you set a double route and the controller does NOT exists, it will give you an error, looking for a "missing" method inside the controller you defined.

That's all I know. Perhaps it could be modified (since there's some fine feedback in BitBucket), or it could just be used like it's working.

My suggestion? Create an independent controller that ONLY handles 404 errors. If you add a method, chaos may break loose.


Messages In This Thread
Incorrect handling of 404? - by El Forum - 02-10-2011, 10:06 AM
Incorrect handling of 404? - by El Forum - 02-10-2011, 10:15 AM
Incorrect handling of 404? - by El Forum - 02-10-2011, 10:18 AM
Incorrect handling of 404? - by El Forum - 02-10-2011, 10:30 AM
Incorrect handling of 404? - by El Forum - 02-10-2011, 10:57 AM
Incorrect handling of 404? - by El Forum - 02-10-2011, 11:00 AM
Incorrect handling of 404? - by El Forum - 02-10-2011, 11:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB