Skip to content

Commit 3ed456b

Browse files
committed
do not coerce NAN to other types
1 parent 418d2a0 commit 3ed456b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ConstraintValidator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ protected function formatValue(mixed $value, int $format = 0): string
127127
return 'true';
128128
}
129129

130+
if (is_nan($value)) {
131+
return 'NAN';
132+
}
133+
130134
return (string) $value;
131135
}
132136

0 commit comments

Comments
 (0)