diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2022-11-18 15:55:36 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2022-11-18 15:55:36 +0000 |
| commit | 65905dc446ba24b6b706b2394d6cc0b3e72c8618 (patch) | |
| tree | 87cb44225fe7e82a2e4232c26d65c75768726948 /app | |
| parent | 0185b78a5d9fca3a7860383f13df765a2e26d8c5 (diff) | |
| download | webtrees-65905dc446ba24b6b706b2394d6cc0b3e72c8618.tar.gz webtrees-65905dc446ba24b6b706b2394d6cc0b3e72c8618.tar.bz2 webtrees-65905dc446ba24b6b706b2394d6cc0b3e72c8618.zip | |
Fix: #4548 - error when generating 405 responses
Diffstat (limited to 'app')
| -rw-r--r-- | app/Http/Middleware/Router.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Http/Middleware/Router.php b/app/Http/Middleware/Router.php index c051326460..4f8b0fad78 100644 --- a/app/Http/Middleware/Router.php +++ b/app/Http/Middleware/Router.php @@ -38,6 +38,7 @@ use Psr\Http\Server\RequestHandlerInterface; use function app; use function implode; use function str_contains; +use function var_dump; /** * Simple class to help migrate to a third-party routing library. @@ -95,7 +96,7 @@ class Router implements MiddlewareInterface if ($failed_route instanceof Route) { if ($failed_route->failedRule === Allows::class) { - Registry::responseFactory()->response('', StatusCodeInterface::STATUS_METHOD_NOT_ALLOWED, [ + return Registry::responseFactory()->response('', StatusCodeInterface::STATUS_METHOD_NOT_ALLOWED, [ 'Allow' => implode(', ', $failed_route->allows), ]); } |
