Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Filesystem] Check that directory is writable after created it in dumpFile()#21200
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
| }elseif (!is_writable($dir)) { | ||
| } | ||
| if (!is_writable($dir)) { |
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 check is already bundled into file_put_contents' failure handling. You're just making this case more explicit, but file_put_contents can fail for more reasons.
So, should it be considered a new feature? Should we use error_get_last to generate a more useful error message? should this go on master?
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.
The handling was already there before. It just didn't take into account that the directory could have been created by another process.
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.
got it :)
nicolas-grekas commentedJan 8, 2017
👍 |
xabbuh commentedJan 8, 2017
👍 Status: Reviewed |
javiereguiluz commentedJan 8, 2017
👍 |
fabpot commentedJan 8, 2017
Thank you@chalasr. |
…d it in dumpFile() (chalasr)This PR was merged into the 2.7 branch.Discussion----------[Filesystem] Check that directory is writable after created it in dumpFile()| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#20612 (comment)| License | MIT| Doc PR | n/aIn case permissions have been changed meanwhileCommits-------dbc4148 [Filesystem] Check that the directory is writable after created it in dumpFile()
In case permissions have been changed meanwhile