Skip to content

Commit ad7bc03

Browse files
committed
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
2 parents 3a4eaf9 + 0ae3838 commit ad7bc03

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ public function isRewindable()
137137
return $this->rewindable;
138138
}
139139

140+
// workaround for an HHVM bug, should be removed when https://github.com/facebook/hhvm/issues/7281 is fixed
141+
if ('' === $this->getPath()) {
142+
return $this->rewindable = false;
143+
}
144+
140145
if (false !== $stream = @opendir($this->getPath())) {
141146
$infos = stream_get_meta_data($stream);
142147
closedir($stream);

0 commit comments

Comments
 (0)