mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Bugfixes and optimisations.
- Fix for __invoke methods (issue: #429) - Fixed not being able to parse body of PUT request. - BaseCsrfVerifier expects the field name to be "csrf-token" (issue: #432) - Minor optimisations
This commit is contained in:
@@ -109,7 +109,7 @@ abstract class Route implements IRoute
|
||||
$router->debug('Loading class %s', $className);
|
||||
$class = $router->getClassLoader()->loadClass($className);
|
||||
|
||||
if (count($controller) === 1) {
|
||||
if (\count($controller) === 1) {
|
||||
$controller[1] = '__invoke';
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ class Router
|
||||
$this->routeStack = [];
|
||||
|
||||
/* Route any routes added to the stack */
|
||||
$this->processRoutes($stack, $route);
|
||||
$this->processRoutes($stack, ($route instanceof IGroupRoute) ? $route : null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user