From 50b565e26035e181c0d8f2b57341dcf5e79705b4 Mon Sep 17 00:00:00 2001 From: Ueli Banholzer Date: Sun, 3 Dec 2023 17:19:16 +0100 Subject: [PATCH] Fixed logic exception if autoconvert is disabled --- src/ParamConverter/HashidsParamConverter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ParamConverter/HashidsParamConverter.php b/src/ParamConverter/HashidsParamConverter.php index 4c80a49..d2ad2b3 100644 --- a/src/ParamConverter/HashidsParamConverter.php +++ b/src/ParamConverter/HashidsParamConverter.php @@ -52,7 +52,7 @@ private function decode(Request $request, ParamConverter $configuration): void $request->attributes->set($name, current($hashids)); } - if (!$this->autoConvert && !$this->hasHashidDecoded($hashids)) { + if ($this->autoConvert && !$this->hasHashidDecoded($hashids)) { throw new LogicException(sprintf('Unable to decode parameter "%s".', $name)); } }