Skip to content
Snippets Groups Projects
Commit 31adcf29 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

fix handling of empty parts in get_route(), closes #1396

Closes #1396

Merge request studip/studip!851
parent 3cdc7aec
No related branches found
No related tags found
No related merge requests found
...@@ -1429,7 +1429,7 @@ function get_route($route = '') ...@@ -1429,7 +1429,7 @@ function get_route($route = '')
foreach ($pieces as $index => $piece) { foreach ($pieces as $index => $piece) {
$trail .= ($trail ? '/' : '') . $piece; $trail .= ($trail ? '/' : '') . $piece;
if ($dispatcher->file_exists($trail . '.php')) { if ($dispatcher->file_exists($trail . '.php')) {
$route = 'dispatch.php/' . $trail . (isset($pieces[$index+1]) ? '/' . $pieces[$index+1] : ''); $route = 'dispatch.php/' . $trail . (!empty($pieces[$index+1]) ? '/' . $pieces[$index+1] : '');
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment