Skip to content

Commit

Permalink
Merge branch '2.7' into 2.8
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nicolas-grekas committed Oct 28, 2016
2 parents bc24c8f + 6508ad7 commit 79f1bd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Iterator/DateRangeFilterIterator.php
Expand Up @@ -44,7 +44,7 @@ public function accept()
{
$fileinfo = $this->current();

if (!file_exists($fileinfo->getRealPath())) {
if (!file_exists($fileinfo->getPathname())) {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions Iterator/SortableIterator.php
Expand Up @@ -41,7 +41,7 @@ public function __construct(\Traversable $iterator, $sort)

if (self::SORT_BY_NAME === $sort) {
$this->sort = function ($a, $b) {
return strcmp($a->getRealpath(), $b->getRealpath());
return strcmp($a->getRealpath() ?: $a->getPathname(), $b->getRealpath() ?: $b->getPathname());
};
} elseif (self::SORT_BY_TYPE === $sort) {
$this->sort = function ($a, $b) {
Expand All @@ -51,7 +51,7 @@ public function __construct(\Traversable $iterator, $sort)
return 1;
}

return strcmp($a->getRealpath(), $b->getRealpath());
return strcmp($a->getRealpath() ?: $a->getPathname(), $b->getRealpath() ?: $b->getPathname());
};
} elseif (self::SORT_BY_ACCESSED_TIME === $sort) {
$this->sort = function ($a, $b) {
Expand Down

0 comments on commit 79f1bd9

Please sign in to comment.