Skip to content

Commit

Permalink
Fix type validation failing for "any" and false-y type wording
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme Deuchnord committed Apr 5, 2022
1 parent 384f945 commit dfb0a87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JsonSchema/Constraints/TypeConstraint.php
Expand Up @@ -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]',
Expand Down

0 comments on commit dfb0a87

Please sign in to comment.