Skip to content

Commit

Permalink
Merge pull request #23 from jaykay-design/fix_when
Browse files Browse the repository at this point in the history
fix "when" detection
  • Loading branch information
dereuromark authored Nov 20, 2020
2 parents fc55b46 + 4fa1495 commit 77e7cec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Routing/Middleware/CacheMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __invoke(Request $request, Response $response, $next) {
}
/** @var callable $when */
$when = $this->getConfig('when');
if ($when !== null && $when($request, $request) !== true) {
if ($when !== null && $when($request, $response) !== true) {
return $next($request, $response);
}

Expand Down

0 comments on commit 77e7cec

Please sign in to comment.