Skip to content

Commit

Permalink
Restrict space:select()'s default limit value to be <= uint32
Browse files Browse the repository at this point in the history
Also, on 32/64-bit Windows PHP_INT_MAX is equal to 2147483647, on 32-bit Linux it's 4294967295 and on 64-bit Linux 9223372036854775807.
  • Loading branch information
Eugene Leonovich committed Mar 14, 2016
1 parent e271a29 commit b2e4a12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Schema/Space.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function select(array $key = null, $index = null, $limit = null, $offset
{
$key = null === $key ? [] : $key;
$offset = null === $offset ? 0 : $offset;
$limit = null === $limit ? PHP_INT_MAX : $limit;
$limit = null === $limit ? PHP_INT_MAX & 0xffffffff : $limit;
$iteratorType = null === $iteratorType ? 0 : $iteratorType;
$index = $this->normalizeIndex($index);

Expand Down

0 comments on commit b2e4a12

Please sign in to comment.