Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Finder] no PHP warning on empty directory iteration#19636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| if ($this->getPath() ==='') { | ||
| return$this->rewindable =false; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
A test should probably be added to cover this scenario
fabpot commentedAug 16, 2016
@ggottwald Can you update the empty title to something relevant? Thanks. |
ggottwald commentedAug 18, 2016
https://gist.github.com/ggottwald/07194dc7926ae9093b773ec2297116f3 |
ggottwald commentedAug 18, 2016
nicolas-grekas commentedAug 23, 2016
@ggottwald could you please add a test case? |
ggottwald commentedAug 31, 2016
Sorry for the late response. Until now I was not able to force a catchable warning in the test. |
nicolas-grekas commentedSep 6, 2016
👍 |
| return$this->rewindable; | ||
| } | ||
| if ($this->getPath() ==='') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
should be using a Yoda condition:'' === $this->getPath()
fabpot commentedSep 14, 2016
Thank you@ggottwald. |
…twald)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
Uh oh!
There was an error while loading.Please reload this page.