Merge branch '2.8' into 3.1

* 2.8:
  added a comment about a workaround
  [Finder] no PHP warning on empty directory iteration
  fixed CS
This commit is contained in:
Fabien Potencier 2016-09-14 15:47:38 -07:00
commit ad7bc0322a

View File

@ -137,6 +137,11 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
return $this->rewindable;
}
// workaround for an HHVM bug, should be removed when https://github.com/facebook/hhvm/issues/7281 is fixed
if ('' === $this->getPath()) {
return $this->rewindable = false;
}
if (false !== $stream = @opendir($this->getPath())) {
$infos = stream_get_meta_data($stream);
closedir($stream);