We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c97438c commit 2023b42Copy full SHA for 2023b42
src/Type/Definition/IntType.php
@@ -74,7 +74,10 @@ public function serialize($value)
74
*/
75
public function parseValue($value)
76
{
77
- return (is_int($value) && $value <= self::MAX_INT && $value >= self::MIN_INT) ? $value : null;
+ // Below is a fix against PHP bug where (in some combinations of OSs and versions)
78
+ // boundary values are treated as "double" vs "integer" and failing is_int() check
79
+ $isInt = is_int($value) || $value === self::MIN_INT || $value === self::MAX_INT;
80
+ return $isInt && $value <= self::MAX_INT && $value >= self::MIN_INT ? $value : null;
81
}
82
83
/**
0 commit comments