diff options
author | Arnold Daniels <arnold@jasny.net> | 2016-11-29 14:40:21 +0100 |
---|---|---|
committer | Arnold Daniels <arnold@jasny.net> | 2016-11-29 14:40:21 +0100 |
commit | 058a9c68acbc2bcbff21749df4207ac2f550586d (patch) | |
tree | f0d3ac09c76ec38fa7420587db3d1706c72cb777 /src/Router.php | |
parent | 2ab3d5087944baf87980c234d7e73958f65261a1 (diff) | |
download | router-origin/middleware-path.zip router-origin/middleware-path.tar.gz router-origin/middleware-path.tar.bz2 |
Added tests for adding middleware with a pathorigin/middleware-path
Diffstat (limited to 'src/Router.php')
-rw-r--r-- | src/Router.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Router.php b/src/Router.php index 63a8fbc..7a4f5c8 100644 --- a/src/Router.php +++ b/src/Router.php @@ -141,10 +141,12 @@ class Router $uriPath = $request->getUri()->getPath(); if ($uriPath === $path || strpos($uriPath, rtrim($path, '/') . '/') === 0) { - return $middleware($request, $response, $next); + $ret = $middleware($request, $response, $next); } else { - return $next($request, $response); + $ret = $next($request, $response); } + + return $ret; }; } |