Skip to content

Commit

Permalink
Fix for missing route
Browse files Browse the repository at this point in the history
  • Loading branch information
eldadfux committed Jul 10, 2020
1 parent 30aeb2a commit d23d5d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public function execute(Route $route, array $args = []): self
{
$keys = [];
$params = [];
$groups = $route->getGroups();
$groups = ($route instanceof Route) ? $route->getGroups() : [];

// Extract keys from URL
$keyRegex = '@^' . \preg_replace('@:[^/]+@', ':([^/]+)', $route->getURL()) . '$@';
Expand Down Expand Up @@ -524,7 +524,7 @@ public function run(Request $request, Response $response)
{
$method = $request->getServer('REQUEST_METHOD', '');
$route = $this->match($request);
$groups = $route->getGroups();
$groups = ($route instanceof Route) ? $route->getGroups() : [];

if (self::REQUEST_METHOD_HEAD == $method) {
$response->disablePayload();
Expand Down

0 comments on commit d23d5d2

Please sign in to comment.