diff --git a/src/Symfony/Component/Serializer/Normalizer/ProblemNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ProblemNormalizer.php index 1b88957f76..17f4500f26 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ProblemNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ProblemNormalizer.php @@ -41,7 +41,7 @@ class ProblemNormalizer implements NormalizerInterface, CacheableSupportsMethodI public function normalize($exception, $format = null, array $context = []) { $context += $this->defaultContext; - $debug = $this->debug && $context['debug'] ?? true; + $debug = $this->debug && ($context['debug'] ?? true); $data = [ 'type' => $context['type'],