[Finder] no PHP warning on empty directory iteration

This commit is contained in:
Götz Gottwald 2016-08-16 16:22:05 +02:00 committed by Fabien Potencier
parent 81e9713c80
commit 695e341258

View File

@ -137,6 +137,10 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
return $this->rewindable; return $this->rewindable;
} }
if ('' === $this->getPath()) {
return $this->rewindable = false;
}
if (false !== $stream = @opendir($this->getPath())) { if (false !== $stream = @opendir($this->getPath())) {
$infos = stream_get_meta_data($stream); $infos = stream_get_meta_data($stream);
closedir($stream); closedir($stream);