Skip to content

Commit 9d9ce5a

Browse files
committed
Fixed undefined index issue.
1 parent a0d9036 commit 9d9ce5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public function controller(string $route, string $controller, array $options = [
407407
if (!in_array($typeHint, ['int', 'float', 'string', 'bool']) && $typeHint !== null) {
408408
continue;
409409
}
410-
$pattern = $this->patterns[":{$typeHint}"] ? ":{$typeHint}" : ":any";
410+
$pattern = isset($this->patterns[":{$typeHint}"]) ? ":{$typeHint}" : ":any";
411411
$endpoints[] = $param->isOptional() ? "{$pattern}?" : $pattern;
412412
}
413413

0 commit comments

Comments
 (0)