Skip to content

Commit 79f1bd9

Browse files
Merge branch '2.7' into 2.8
* 2.7: Compatibility with Twig 1.27 Enhance GAE compat by removing some realpath() bumped Symfony version to 2.7.21 updated VERSION for 2.7.20 update CONTRIBUTORS for 2.7.20 updated CHANGELOG for 2.7.20 [SecurityBundle] Fix twig-bridge lowest dep
2 parents bc24c8f + 6508ad7 commit 79f1bd9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Iterator/DateRangeFilterIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function accept()
4444
{
4545
$fileinfo = $this->current();
4646

47-
if (!file_exists($fileinfo->getRealPath())) {
47+
if (!file_exists($fileinfo->getPathname())) {
4848
return false;
4949
}
5050

Iterator/SortableIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(\Traversable $iterator, $sort)
4141

4242
if (self::SORT_BY_NAME === $sort) {
4343
$this->sort = function ($a, $b) {
44-
return strcmp($a->getRealpath(), $b->getRealpath());
44+
return strcmp($a->getRealpath() ?: $a->getPathname(), $b->getRealpath() ?: $b->getPathname());
4545
};
4646
} elseif (self::SORT_BY_TYPE === $sort) {
4747
$this->sort = function ($a, $b) {
@@ -51,7 +51,7 @@ public function __construct(\Traversable $iterator, $sort)
5151
return 1;
5252
}
5353

54-
return strcmp($a->getRealpath(), $b->getRealpath());
54+
return strcmp($a->getRealpath() ?: $a->getPathname(), $b->getRealpath() ?: $b->getPathname());
5555
};
5656
} elseif (self::SORT_BY_ACCESSED_TIME === $sort) {
5757
$this->sort = function ($a, $b) {

0 commit comments

Comments
 (0)