Skip to content

Commit af554a7

Browse files
Merge branch '3.1'
* 3.1: [PhpUnitBridge] Fix undefined variable Compatibility with Twig 1.27 Remove extra line in doc-block comment [VarDumper] Fix dumping Twig source in stack traces Enhance GAE compat by removing some realpath() [DependencyInjection] Remove old code in XML loader bumped Symfony version to 3.1.7 updated VERSION for 3.1.6 updated CHANGELOG for 3.1.6 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 4147638 + 85c1b82 commit af554a7

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)