Skip to content

Commit 38201a1

Browse files
committed
fix: TypeError for OPTIONS routes when translateURIDashes is enabled
1 parent 153922e commit 38201a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/Router/Router.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public function getFilters(): array
247247
*/
248248
public function controllerName()
249249
{
250-
return $this->translateURIDashes
250+
return $this->translateURIDashes && ! $this->controller instanceof Closure
251251
? str_replace('-', '_', $this->controller)
252252
: $this->controller;
253253
}

0 commit comments

Comments
 (0)