Skip to content

Commit 6a1a34f

Browse files
Merge branch '2.8' into 3.1
* 2.8: Compatibility with Twig 1.27 [VarDumper] Fix dumping Twig source in stack traces Enhance GAE compat by removing some realpath() bumped Symfony version to 2.8.14 updated VERSION for 2.8.13 updated CHANGELOG for 2.8.13 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 205b5ff + 79f1bd9 commit 6a1a34f

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)