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)); } }