CodeIgniter Forums
Closure routes error with setTranslateURIDashes set to True - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: Closure routes error with setTranslateURIDashes set to True (/thread-74403.html)



Closure routes error with setTranslateURIDashes set to True - scoffield_1 - 09-19-2019

The ci4 documentation clearly states that the setTranslateURIDashes when set to true translates dashes in controller and method names to underscores because dashes are invalid controller, method name. This works perfectly with controller, method routes but tends to give errorException when you hit a routes with closure, consequently affecting route groups which are important in most applications.