diff --git a/src/ProblemDetailsResponseFactory.php b/src/ProblemDetailsResponseFactory.php index 1a940ae..5e193c6 100644 --- a/src/ProblemDetailsResponseFactory.php +++ b/src/ProblemDetailsResponseFactory.php @@ -220,7 +220,7 @@ public function __construct( } // Ensures type safety of the composed factory $this->responseFactory = $responseFactory; - if (! $jsonFlags) { + if ($jsonFlags === null) { $jsonFlags = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION diff --git a/test/ProblemDetailsResponseFactoryTest.php b/test/ProblemDetailsResponseFactoryTest.php index 552462a..ac7ad67 100644 --- a/test/ProblemDetailsResponseFactoryTest.php +++ b/test/ProblemDetailsResponseFactoryTest.php @@ -144,7 +144,7 @@ public function testCreateResponseRemovesInvalidCharactersFromXmlKeys(string $he ], ]; - if (stripos($expectedType, 'xml')) { + if (stripos($expectedType, 'xml') !== false) { $expectedKeyNames = [ 'A_-', '_A-',