Skip to content

Commit

Permalink
Merge pull request #1839 from bintzandt/1838-hardcoded-route-ids-does…
Browse files Browse the repository at this point in the history
…-not-work

Dont replace slashes with backslashes in the to route
  • Loading branch information
lonnieezell authored Mar 22, 2019
2 parents 8c0f620 + 121aaf0 commit f5563e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion system/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,12 @@ protected function checkRoutes(string $uri): bool
}
elseif (strpos($val, '/') !== false)
{
$val = str_replace('/', '\\', $val);
[ $controller, $method ] = explode( '::', $val );

// Only replace slashes in the controller, not in the method.
$controller = str_replace('/', '\\', $controller);

$val = $controller . '::' . $method;
}

// Is this route supposed to redirect to another?
Expand Down

0 comments on commit f5563e6

Please sign in to comment.