Skip to content

Commit

Permalink
fix: TypeError for OPTIONS routes when translateURIDashes is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
maniaba committed Oct 2, 2024
1 parent 153922e commit 38201a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public function getFilters(): array
*/
public function controllerName()
{
return $this->translateURIDashes
return $this->translateURIDashes && ! $this->controller instanceof Closure
? str_replace('-', '_', $this->controller)
: $this->controller;
}
Expand Down

0 comments on commit 38201a1

Please sign in to comment.