Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions system/Router/AutoRouterImproved.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ private function createSegments(string $uri): array
{
$segments = explode('/', $uri);
$segments = array_filter($segments, static fn ($segment) => $segment !== '');

// numerically reindex the array, removing gaps
return array_values($segments);
}
Expand Down
1 change: 1 addition & 0 deletions system/Router/RouteCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1455,6 +1455,7 @@ protected function create(string $verb, string $from, $to, ?array $options = nul
}

$routeKey = $from;

// Replace our regex pattern placeholders with the actual thing
// so that the Router doesn't need to know about any of this.
foreach ($this->placeholders as $tag => $pattern) {
Expand Down
1 change: 1 addition & 0 deletions tests/system/ControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function testConstructorHTTPS(): void
{
$original = $_SERVER;
$_SERVER = ['HTTPS' => 'on'];

// make sure we can instantiate one
try {
$this->controller = new class () extends Controller {
Expand Down