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/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Closure routes error with setTranslateURIDashes set to True (/showthread.php?tid=74403)



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.