Skip to content

Commit fc5735d

Browse files
committed
refactor(router): make optional segment check stricter
1 parent d076aff commit fc5735d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/router/src/Routing/Construction/RoutingTree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function add(MarkedRoute $markedRoute): void
4646

4747
private function isOptionalSegment(string $segment): bool
4848
{
49-
return str_contains($segment, '?');
49+
return str_starts_with($segment, '{?');
5050
}
5151

5252
private function stripOptionalMarker(string $segment): string

0 commit comments

Comments
 (0)