Browse files

[Finder] fixed a potential issue on Solaris where INF value is wrong …

…(refs #7269)
  • Loading branch information...
1 parent c66d4fc commit 69858f868c0caabe3d859c448f98d249541c0489 @fabpot fabpot committed Mar 6, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 Iterator/DepthRangeFilterIterator.php
View
4 Iterator/DepthRangeFilterIterator.php
@@ -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 '>':
@@ -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);
}

0 comments on commit 69858f8

Please sign in to comment.