Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7241be9

Browse files
committed
[Finder] fixed a potential issue on Solaris where INF value is wrong (refs #7269)
1 parent a31deeb commit 7241be9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class DepthRangeFilterIterator extends FilterIterator
2929
public function __construct(\RecursiveIteratorIterator $iterator, array $comparators)
3030
{
3131
$minDepth = 0;
32-
$maxDepth = INF;
32+
$maxDepth = PHP_INT_MAX;
3333
foreach ($comparators as $comparator) {
3434
switch ($comparator->getOperator()) {
3535
case '>':
@@ -50,7 +50,7 @@ public function __construct(\RecursiveIteratorIterator $iterator, array $compara
5050
}
5151

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

5555
parent::__construct($iterator);
5656
}

0 commit comments

Comments
 (0)