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] use proper keys to not override appended files#40023
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
xabbuh commentedJan 28, 2021
| Q | A |
|---|---|
| Branch? | 4.4 |
| Bug fix? | yes |
| New feature? | no |
| Deprecations? | no |
| Tickets | Fix#40022 |
| License | MIT |
| Doc PR |
| foreach ($iteratoras$file) { | ||
| $it->append($fileinstanceof \SplFileInfo ?$file :new \SplFileInfo($file)); | ||
| $file =$fileinstanceof \SplFileInfo ?$file :new \SplFileInfo($file); | ||
| $it[$file->getRealPath()] =$file; |
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.
This won't work for non-existing files. Not sure if that's an issue though.
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.
Instead ofgetRealPath(), I suggest usinggetPathname(), which would also work for stream wrappers not supportingrealpath().
Non-existent files are OK to me. I don't think this is an expected supported case for the Finder anyway.
shyim left a comment
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.
Our Swagger page does load again with this fix
nicolas-grekas commentedJan 28, 2021
Thank you@xabbuh. |