diff --git a/Koha/Middleware/CSRF.pm b/Koha/Middleware/CSRF.pm index 314c311aa6..29b1e1ae25 100644 --- a/Koha/Middleware/CSRF.pm +++ b/Koha/Middleware/CSRF.pm @@ -76,8 +76,7 @@ sub call { $error = "wrong_csrf_token"; } } - } - elsif ( !exists $stateless_methods{$request_method} && !exists $stateful_methods{$request_method} ) { + } elsif ( !exists $stateless_methods{$request_method} && !exists $stateful_methods{$request_method} ) { $error = sprintf "unknown or unsupported method %s", $request_method; }