Skip to content

Commit

Permalink
bug #18399 [Intl] Fix int32 min boundary check (nicolas-grekas)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.0 branch.

Discussion
----------

[Intl] Fix int32 min boundary check

| Q             | A
| ------------- | ---
| Branch?       | 3.0
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This is the right fix, introduced in a bad merge.

Commits
-------

f29476e [Intl] Fix int32 min boundary check
  • Loading branch information
nicolas-grekas committed Apr 1, 2016
2 parents c3f0bfe + f29476e commit 42dd362
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -851,7 +851,7 @@ private function getInt64Value($value)
return false;
}

if (PHP_INT_SIZE !== 8 && ($value > self::$int32Max || $value <= -self::$int32Max - 1)) {
if (PHP_INT_SIZE !== 8 && ($value > self::$int32Max || $value < -self::$int32Max - 1)) {
return (float) $value;
}

Expand Down

0 comments on commit 42dd362

Please sign in to comment.