Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit23cae58

Browse files
committed
bug#19636 [Finder] no PHP warning on empty directory iteration (ggottwald)
This PR was squashed before being merged into the 2.7 branch (closes#19636).Discussion----------[Finder] no PHP warning on empty directory iteration| Q | A| ------------- | ---| Branch? | 2.8| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR | Since RecursiveDirectoryIterator::SKIP_DOTS is set as flag, opendir gets a warning if an empty directory is reachedCommits-------695e341 [Finder] no PHP warning on empty directory iteration
2 parents81e9713 +695e341 commit23cae58

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

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

140+
if ('' ===$this->getPath()) {
141+
return$this->rewindable =false;
142+
}
143+
140144
if (false !==$stream = @opendir($this->getPath())) {
141145
$infos =stream_get_meta_data($stream);
142146
closedir($stream);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp