From dfb0a8735d3711a585104f9b30a65f7108eb6eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Tue, 5 Apr 2022 15:28:21 +0200 Subject: [PATCH] Fix type validation failing for "any" and false-y type wording --- src/JsonSchema/Constraints/TypeConstraint.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JsonSchema/Constraints/TypeConstraint.php b/src/JsonSchema/Constraints/TypeConstraint.php index 0ef32843..efc0abbc 100644 --- a/src/JsonSchema/Constraints/TypeConstraint.php +++ b/src/JsonSchema/Constraints/TypeConstraint.php @@ -134,7 +134,7 @@ protected function implodeWith(array $elements, $delimiter = ', ', $listEnd = fa */ protected function validateTypeNameWording($type) { - if (!isset(self::$wording[$type])) { + if (!array_key_exists($type, self::$wording)) { throw new StandardUnexpectedValueException( sprintf( 'No wording for %s available, expected wordings are: [%s]',