reverted last name change, not needed
This commit is contained in:
parent
48585f14ab
commit
572cc1eb89
|
@ -107,18 +107,18 @@ class Router
|
||||||
if ($route->getName() == $routeName) {
|
if ($route->getName() == $routeName) {
|
||||||
if ($vars) {
|
if ($vars) {
|
||||||
// build route for dynamic routes
|
// build route for dynamic routes
|
||||||
$newRoute = $route->getRoute();
|
$route = $route->getRoute();
|
||||||
// replace placeholder with current values
|
// replace placeholder with current values
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
$newRoute = str_replace(search: '{' . $key . '}', replace: $value, subject: $route);
|
$route = str_replace(search: '{' . $key . '}', replace: $value, subject: $route);
|
||||||
}
|
}
|
||||||
return $newRoute;
|
return $route;
|
||||||
} else {
|
} else {
|
||||||
return $route->getRoute();
|
return $route->getRoute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// no 404, this is reached only if the code is wrong
|
// no 404, this is reached only if the code is buggy
|
||||||
die("Missing Route: $routeName");
|
die("Missing Route: $routeName");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue