Skip to content

Commit

Permalink
[Finder] fixed a potential issue on Solaris where INF value is wrong …
Browse files Browse the repository at this point in the history
…(refs #7269)
  • Loading branch information
fabpot committed Mar 6, 2013
1 parent a31deeb commit 7241be9
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -29,7 +29,7 @@ class DepthRangeFilterIterator extends FilterIterator
public function __construct(\RecursiveIteratorIterator $iterator, array $comparators)
{
$minDepth = 0;
$maxDepth = INF;
$maxDepth = PHP_INT_MAX;
foreach ($comparators as $comparator) {
switch ($comparator->getOperator()) {
case '>':
Expand All @@ -50,7 +50,7 @@ public function __construct(\RecursiveIteratorIterator $iterator, array $compara
}

$this->minDepth = $minDepth;
$iterator->setMaxDepth(INF === $maxDepth ? -1 : $maxDepth);
$iterator->setMaxDepth(PHP_INT_MAX === $maxDepth ? -1 : $maxDepth);

parent::__construct($iterator);
}
Expand Down

0 comments on commit 7241be9

Please sign in to comment.